DEV Community

Anthony Leignel
Anthony Leignel

Posted on Edited on

πŸ—οΈ Building Without Frameworks in the AI Era: Architectural Freedom, Engineering Discipline, and Security

Palks Studio website built with native web technologies and specialized backend components

Frameworks play a central role in modern software development. They provide predefined structures, conventions, reusable components, and mechanisms designed to accelerate application development.

But are they essential for every project?

As artificial intelligence transforms development practices, this question deserves a different perspective. It is no longer just about comparing the time required to build a feature with or without a framework. It is also about code ownership, maintainability, dependencies, and application security.

The Palks Studio technical ecosystem provides an example of this approach. Its website, tools, and systems rely primarily on native technologies, specialized components, and dependencies selected according to actual requirements.

This approach is not about rejecting frameworks. It is about not treating them as a mandatory starting point.


1. A Framework Is Not an Architecture

A framework provides a development structure. It can organize routing, controllers, models, data access, authentication, and many other features.

An architecture defines how the components of a system interact, their responsibilities, their dependencies, and the boundaries between different layers.

These are not equivalent concepts.

An application built without a framework can have a rigorous architecture, while an application using a well-established framework can suffer from poor separation of responsibilities.

Choosing a framework does not eliminate the need to design an architecture.

In the Palks Studio ecosystem, the architecture is based on a separation between:

  • Public interfaces
  • Browser-side processing
  • Server-side endpoints
  • Business logic engines
  • Persistent data
  • Specialized services and libraries

This organization allows different technologies to coexist within the same ecosystem without imposing a single application structure on every component.


2. Building an Ecosystem with Native Technologies

The public website relies primarily on HTML, CSS, and vanilla JavaScript. Operations requiring a backend are handled by PHP scripts, while certain specialized engines use Python.

Storage is adapted to each requirement: JSON files, CSV logs, or SQLite databases when historical data needs to be retained and queried.

The general architecture can be represented as follows:

                      Browser
                         β”‚
                         β–Ό
               HTML / CSS / JavaScript
                         β”‚
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚                           β”‚
           β–Ό                           β–Ό
   Client-side processing        PHP endpoints
           β”‚                           β”‚
           β–Ό                           β–Ό
    Interactive tools           Business engines
                                       β”‚
                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                         β”‚             β”‚             β”‚
                         β–Ό             β–Ό             β–Ό
                       JSON           CSV          SQLite
                                       β”‚
                                       β–Ό
                            Specialized components
                                PHP / Python
Enter fullscreen mode Exit fullscreen mode

Public pages do not systematically require a server-side rendering engine. Sensitive operations and persistent data processing are delegated to the components that actually need them.

This approach does not eliminate complexity. It makes it possible to determine precisely where that complexity should live.


3. Independent Tools Instead of a Monolithic Application

Several systems coexist within this ecosystem.

Component Technologies and architecture
Public website HTML, CSS, JavaScript, PHP endpoints
Quote generator Vanilla JavaScript and jsPDF
Factur-X generation PHP, Python, and document libraries
Automated invoicing PHP, CLI, cron, and structured files
Public data monitoring dashboards Data collectors, PHP, and SQLite
Website assistant Python, JSON, and deterministic logic
Digital distribution PHP, access tokens, and file-based storage

Each component has its own constraints.

A quote generator running entirely in the browser does not require the same infrastructure as a financial system that stores invoices and payment records.

A monitoring dashboard processing several years of historical data requires different storage and query mechanisms from an assistant using a JSON knowledge base.

The objective is not to build everything with the same technology, but to avoid imposing a common dependency on components that do not need it.

Framework-Free Does Not Mean Library-Free

This distinction matters.

A specialized library generally addresses a specific requirement. A framework more broadly defines the structure and execution lifecycle of an application.

Using jsPDF to generate a document, mPDF to produce a server-side PDF, or an SDK to communicate with a payment provider does not invalidate a framework-free application architecture.

It would also be unreasonable to systematically reimplement complex functionality already covered by established libraries.

The principle is to select dependencies according to their actual value rather than adopting an entire application environment by default.


4. Vanilla JavaScript: More Control Over Application Behavior

An interactive interface does not necessarily require a JavaScript framework.

Native browser APIs already provide event handling, form processing, HTTP requests, DOM manipulation, and many of the mechanisms needed to manage application state.

Consider a simple dynamic calculation within a form:

const quantity = document.querySelector('#quantity');
const price = document.querySelector('#price');
const total = document.querySelector('#total');

function updateTotal() {
    const amount =
        Number(quantity.value) * Number(price.value);

    total.textContent = new Intl.NumberFormat('fr-FR', {
        style: 'currency',
        currency: 'EUR'
    }).format(amount);
}

quantity.addEventListener('input', updateTotal);
price.addEventListener('input', updateTotal);
Enter fullscreen mode Exit fullscreen mode

This feature requires no build system, external state manager, or additional rendering engine.

For a simple interface, the behavior remains directly observable in the code.

However, as interactions multiply, components become interdependent, and application state grows more complex, vanilla JavaScript requires greater discipline.

Modules must be organized, function responsibilities must remain limited, and data flows must be clearly defined.

The absence of a framework should not result in an accumulation of disconnected, poorly organized scripts.


5. Native PHP: Building Only the Backend That Is Needed

An HTML page can communicate with a PHP endpoint without requiring a complete backend framework.

HTML form
    β”‚
    β–Ό
HTTP request
    β”‚
    β–Ό
PHP endpoint
    β”‚
    β”œβ”€β”€ HTTP method validation
    β”œβ”€β”€ Input validation
    β”œβ”€β”€ Authorization checks
    β”œβ”€β”€ Business logic
    └── HTTP response
Enter fullscreen mode Exit fullscreen mode

This approach makes it possible to create targeted server-side operations for document generation, secure downloads, or data persistence.

The following is an educational example of a JSON endpoint:

<?php

declare(strict_types=1);

header('Content-Type: application/json; charset=utf-8');

if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
    header('Allow: POST');
    http_response_code(405);

    echo json_encode([
        'error' => 'Method not allowed'
    ]);

    exit;
}

try {
    $data = json_decode(
        file_get_contents('php://input'),
        true,
        512,
        JSON_THROW_ON_ERROR
    );
} catch (JsonException $e) {
    http_response_code(400);

    echo json_encode([
        'error' => 'Invalid JSON'
    ]);

    exit;
}

if (!is_array($data)
    || !isset($data['quantity'])
    || !is_int($data['quantity'])
    || $data['quantity'] < 1
    || $data['quantity'] > 1000) {

    http_response_code(422);

    echo json_encode([
        'error' => 'Invalid quantity'
    ]);

    exit;
}

echo json_encode([
    'quantity' => $data['quantity'],
    'status' => 'validated'
]);
Enter fullscreen mode Exit fullscreen mode

This example illustrates only the reception and validation of a request. It is not a complete production endpoint.

Depending on the feature, additional mechanisms would be required for authentication, authorization, request size limits, rate limiting, or CSRF protection.

This is precisely one of the challenges of framework-free development: responsibilities do not disappear. They must be handled explicitly.


6. Application Security: The Cost of Architectural Freedom

Modern frameworks often provide built-in security mechanisms or conventions that make them easier to implement.

Without a framework, these mechanisms must be selected, implemented, configured, and verified directly.

Risk Required security measure
SQL injection Prepared statements and input validation
XSS Context-aware output encoding
CSRF Protection of sensitive authenticated operations
Unauthorized access Server-side authorization checks
Brute-force attacks Rate limiting and logging
Malicious file uploads Content, size, and storage validation
Secret exposure Private configuration and access separation
Concurrent writes Locking and consistency management
Vulnerable dependencies Monitoring, updates, and version management

Developers must also ensure that these protections are applied consistently throughout the system.

Example: Prepared Statements with SQLite

A PHP application using SQLite can execute queries through PDO without requiring an ORM.

$stmt = $pdo->prepare(
    'SELECT date, value
     FROM measurements
     WHERE source = :source
     ORDER BY date DESC
     LIMIT 100'
);

$stmt->execute([
    'source' => $source
]);

$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
Enter fullscreen mode Exit fullscreen mode

Using a prepared statement avoids directly concatenating user-provided values into the SQL query.

It does not eliminate the need to validate incoming parameters or verify that the user is authorized to access the requested data.

Example: Generating an Access Token

A secure download system can rely on a server-generated token:

$token = bin2hex(random_bytes(32));
$tokenHash = hash('sha256', $token);
Enter fullscreen mode Exit fullscreen mode

But token generation represents only one part of the mechanism.

The system must also manage its expiration, association with a specific resource, consumption, access attempts, and revocation conditions.

In a single-use token system, two simultaneous requests must not be able to consume the same token.

Framework-free development therefore requires consideration of the entire security lifecycle, not just the function that generates the token.


7. Security Should Be a Shared Layer, Not a Series of Patches

One risk of a framework-free architecture is duplicating the same security checks across multiple scripts.

One endpoint may correctly verify authorization while another omits the same check. One form may be protected against duplicate submissions while another is not.

A rigorous architecture must prevent this fragmentation.

Cross-cutting mechanisms can be grouped into shared components:

Application endpoints
          β”‚
          β–Ό
     Shared layer
          β”‚
          β”œβ”€β”€ Authentication
          β”œβ”€β”€ Authorization
          β”œβ”€β”€ Validation
          β”œβ”€β”€ Rate limiting
          β”œβ”€β”€ Logging
          └── Error handling
          β”‚
          β–Ό
      Business logic
Enter fullscreen mode Exit fullscreen mode

This structure illustrates an architectural principle rather than reproducing the internal Palks Studio implementation.

The idea is to maintain reusable security mechanisms without necessarily adopting a complete framework.

Application security must also be distinguished from infrastructure security.

Session protection, form validation, and prepared statements do not replace PHP updates, web server configuration, file permissions, or backups.

A lightweight system is not automatically a secure system.


8. Storage: Choosing According to Requirements Rather Than Convention

Storage provides another example of architectural freedom.

Not every application needs a database server, but not every application can operate efficiently with simple files either.

Within the ecosystem described here, several storage models coexist:

JSON
  β†’ Configuration, knowledge, metadata

CSV
  β†’ Financial logs, exports, structured data

SQLite
  β†’ Historical data, queries, aggregations

PDF
  β†’ Generated documents and archives
Enter fullscreen mode Exit fullscreen mode

Public data monitoring dashboards use SQLite when data must be retained and queried over extended periods.

Invoicing engines can use structured files to maintain documents, counters, and financial records.

The appropriate choice depends on data volume, write frequency, relationships between records, and consistency requirements.

Flat files may be suitable for certain operations, but they do not automatically provide the transactional guarantees of a database.

Conversely, introducing a remote database for a tool that does not retain any data would not necessarily provide additional value.

Architecture should respond to the actual requirements of the system.


9. Artificial Intelligence Changes the Development Trade-Off

For a long time, one of the main arguments in favor of frameworks was development speed.

Building a feature with native technologies could require additional research, documentation, and manual implementation.

Artificial intelligence is gradually changing this trade-off.

It can assist with:

  • Generating an initial implementation from a specific requirement
  • Understanding and documenting existing code
  • Refactoring components
  • Identifying inconsistencies and edge cases
  • Preparing tests
  • Reviewing potential security risks
  • Maintaining bilingual interfaces and documentation

These capabilities make certain custom architectures more accessible and potentially less expensive to evolve.

They also make it easier to work directly with native technologies without systematically adopting an additional abstraction layer.

However, AI does not eliminate engineering constraints.

Generated code may work in a demonstration scenario while containing a security vulnerability, a concurrency issue, or incorrect behavior in a specific business case.

A function that appears correct does not guarantee the consistency of the system it belongs to.

AI can accelerate code production. It does not guarantee code quality, security, or maintainability.


10. AI Should Not Become an Invisible Framework

AI-assisted development introduces another risk: accumulating generated features without understanding their organization.

A sequence of prompts can produce an apparently functional application whose components follow different conventions, duplicate the same operations, or introduce unnecessary dependencies.

Functional requirement
          β”‚
          β–Ό
    Generated code
          β”‚
          β–Ό
  Analysis and integration
          β”‚
          β–Ό
 Tests and security checks
          β”‚
          β–Ό
 Architectural validation
          β”‚
          β–Ό
Documentation and maintenance
Enter fullscreen mode Exit fullscreen mode

Code generation represents only one stage of this process.

Developers must retain a comprehensive understanding of the application, its data, its trust boundaries, and its responsibilities.

Without that understanding, AI can accelerate the creation of technical debt just as easily as it accelerates development.

In a framework-free architecture, this requirement becomes even more important. There are not necessarily predefined conventions to guide the implementation of new features.

Those conventions must be established and maintained at the project level.


11. Performance, Dependencies, and Maintenance

An architecture relying primarily on native technologies can reduce certain execution layers and maintenance costs.

An HTML, CSS, and JavaScript website can be deployed without a complex build pipeline. A PHP endpoint can handle a targeted operation without loading an entire application framework. A Python engine can run on demand without requiring a permanent application server.

This is the case for the assistant integrated into the Palks Studio website, whose engine relies on Python, a JSON knowledge base, and deterministic logic.

But these benefits are not automatic.

A poorly organized JavaScript interface can be more difficult to maintain than an interface built with a framework. Redundant PHP scripts can become more expensive to maintain than an architecture based on established components.

Similarly, a framework-free architecture can gradually end up rebuilding its own internal framework.

The number of dependencies is therefore not a sufficient indicator of quality.

Their usefulness, maturity, maintenance cost, and the responsibilities transferred to the project when they are removed must also be considered.


12. When a Framework Remains the Better Choice

There are many situations in which a framework provides genuine value.

A complex collaborative application, an interface with numerous interdependent states, or a project developed by multiple teams can benefit from shared conventions and standardized components.

A framework can also simplify the onboarding of new developers and avoid reimplementing mechanisms that have already been extensively tested.

The decision should therefore be evaluated according to several criteria:

Criterion Question to consider
Functional complexity Does the application require numerous interactions and relationships?
Team size Are shared conventions essential?
Security Can the required protections be properly maintained without a framework?
Maintainability Will the system remain understandable several years from now?
Dependencies Does the framework provide enough value to justify its cost?
Evolution Can the architecture support the growth of the project?

In some cases, native technologies provide the best trade-off. In others, a framework can significantly reduce risks and costs.

Artificial intelligence does not make this decision obsolete. It introduces new possibilities, but the constraints of the project remain decisive.


Conclusion

Building without frameworks is a way to retain significant freedom in how a system is constructed.

Technologies, data structures, components, and execution mechanisms can be selected according to the actual requirements of each feature.

The Palks Studio ecosystem illustrates this approach through native web interfaces, PHP and Python engines, browser-based tools, and storage models adapted to their specific use cases.

But this freedom comes with additional responsibility.

The benefits gained by reducing dependencies must be weighed against the work required to maintain a coherent architecture, secure application operations, and ensure code quality.

Security must never become the compromise made to achieve these benefits. It deserves at least as much attention, if not more, when protections typically provided by a framework are handled directly.

In the AI era, building without frameworks is becoming an increasingly accessible option. That does not mean frameworks should systematically be avoided.

The objective remains to build systems whose technical decisions are understood, controlled, and justified, rather than following an architecture imposed by habit.


Technical Documentation

The general architecture of the Palks Studio ecosystem, its components, and its design principles are described in its public documentation.

View the technical documentation on GitHub


https://palks-studio.com

Top comments (4)

Collapse
 
mortylen profile image
mortylen •

I’d also highlight the SEO advantages of static websites a bit more. Since the content is pre-generated, pages load faster, which has a positive impact on search engine rankings. On top of that, there are fewer technical obstacles when it comes to indexing πŸ˜‰

Collapse
 
palks_studio profile image
Anthony Leignel •

Good point β€” SEO benefits are real, especially with simpler indexing. Thanks.

Collapse
 
shaishav_patel_271fdcd61a profile image
Shaishav Patel •

This framing β€” "moving complexity, not eliminating it" β€” is exactly the mental model I needed when I started building a browser-based tools site. We do PDF manipulation, image compression, and QR generation entirely on the client with pdf-lib, Canvas API, and html5-qrcode. The server never sees a single file.

The tradeoff that surprised me most: debugging becomes much simpler. When a PDF fails to process, I know it's client code β€” no server logs to chase, no network issues to rule out. The failure surface really does shrink.

The part I'd add: the line gets interesting when you need persistent state. Analytics, saved configurations, user history β€” that's where I eventually introduced a thin API layer. Static handles 90% of the features; the 10% that needs server is much easier to scope and reason about when the rest is already clean.

Collapse
 
palks_studio profile image
Anthony Leignel •

Exactly β€” there are limits, especially when persistence is required.
But for a large part of real-world use cases, a lot can be done without piling up dependencies.

Glad to see others working with this approach.
Today everything tends to default to SaaS and added complexity, even when it’s not necessary.