Are there any web developers here?

How do you do not go insane with frustration? I started writing a web app and I already want to throw my computer out of the window and viciously murder everybody who created the node/svelte/service-worker technology stack!

I remember evaluating that stack about 10 years ago for an MNC and concluded that it was a complex peice of nonsense that would dramatically increase the TOC for application developement and was best avoided. And I have not seen anything since that would cause me to chance my opinion.

Are you sure you have the right tool for the job? What are you trying to do?

I wanted to write a fairly simple app which a user can interact with and save stuff (not too dissimilar to an personal wiki).

I thought Iโ€™d try PouchDB since then it could work offline and then the sync to CouchDB would be handled automagically. Svelte was billed as a shallow learning curve and I could then maybe use UI components and not spend too much time on that.

I might just scrap the offline capability as that is adding a ton of complexity and fragility. That and there are a billion imports before you even write a hello world. It fells like crap piled on top of crap and weird errors crop up everywhere.

What do you normally use?

Give ASP.NET a go.

Iโ€™ve done some web apps in my historyโ€ฆ

Donโ€™t go the route of synchronous apps like ASP.NET, actually thatโ€™s not bad tech but also not easy to debug/develop and in real world setups it gives a terrible performance. Current web apps are really web-client apps running in the browser, instead of being somewhat enhanced by js web pages which are send back and forth with every user input.

For the backend Iโ€™d use something simple, Python or Go. For the fronted, something lightweight, React or Vue. And to glue them together youโ€™d use old good REST or go with GraphQL if youโ€™d like a bit more modern approach.

The DB youโ€™d handle at the backend. I know, Iโ€™ve seen this terrible examples where people talked to DB directly from the client web code, terrible idea for a real world commercial project but if you really want to go that way in your one-off hobby project to avoid running any backendโ€ฆ :person_shrugging:

Ofc, on top of react for handling the web app logic, youโ€™ll need some presentation library. I forgot the name of the alibaba thing, so just googled it out, itโ€™s Ant Design UI Components | Hands on React

1 Like

OK. With todayโ€™s experience, Iโ€™m ready to bin todayโ€™s work and start again dropping the offline functionality.

I think tomorrow I will try something much simpler: server side rendered pages using python, FastAPI and HTMX.

Can also have a look at Typo3 if you donโ€™t want to reinvent the wheel.

Otherwise this may help

yup, hard to say what you were looking for to built from your post, but for small scale hobby project this approach seems best, just write the app code and make the framework โ€˜make itโ€™ accessible via local web

1 Like

Probably PHP, especially if you have not got a lot of experience and you have a fairly basic app to build. Itโ€™s very forgiving and supports several different development models.

I would go with HTMX: choose something sane and familiar for the back-end, and use the simplest possible JS on the front-end.

1 Like

After 26 minutes with AI, I have a working proof of concept!

Give a high-level bullet point summary of the technologies used in this project in markdown that would let someone unfamiliar with it understand the tech stack.

โœฆ Wiki MVP with PostgreSQL - Technology Stack

Core Technologies

  • Python 3.11 - Primary programming language
  • FastAPI - Modern, fast web framework for building APIs with Python 3.7+ based on standard Python type hints
  • SQLAlchemy 2.0 - SQL toolkit and Object-Relational Mapping (ORM) library for Python
  • PostgreSQL - Powerful, open-source object-relational database system
  • Alembic - Lightweight database migration tool for SQLAlchemy

Frontend Technologies

  • Jinja2 - Modern and designer-friendly templating language for Python
  • HTML5 - Standard markup language for creating web pages
  • CSS3 - Style sheet language for presentation
  • Font Awesome - Icon library and toolkit

Development & Deployment Tools

  • Docker - Containerization platform for consistent deployment across environments
  • Uvicorn - Lightning-fast ASGI server implementation, using uvloop and httptools
  • Pydantic - Data validation and settings management using Python type annotations
  • Python-dotenv - Reads key-value pairs from .env file and adds them to environment variables

Key Features

  • RESTful API - Clean API endpoints for page management
  • Database Migrations - Automated database schema management with Alembic
  • Environment Configuration - Secure configuration management with .env files
  • Input Validation - Comprehensive data validation using Pydantic schemas
  • Responsive Design - Mobile-friendly interface with CSS Grid and Flexbox
  • Search Functionality - Full-text search across wiki pages
  • Pagination - Efficient handling of large datasets
  • Health Checks - Application monitoring endpoints
  • Security Best Practices - SQL injection prevention, input sanitization, and secure configuration

Architecture Patterns

  • Model-View-Controller (MVC) - Separation of concerns between data models, business logic, and presentation
  • Dependency Injection - FastAPIโ€™s built-in dependency injection system
  • Repository Pattern - CRUD operations encapsulated in dedicated classes
  • Context Managers - Proper resource management for database connections

so please post the final total stats if you ever finish it :sweat_smile:

Well last night it had already grown considerably:

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                                                                              โ”‚
โ”‚  Agent powering down. Goodbye!                                                                                               โ”‚
โ”‚                                                                                                                              โ”‚
โ”‚  Interaction Summary                                                                                                         โ”‚
โ”‚  Session ID:                 a98b4aec-a3a1-43ec-8c4d-245cb858f0c2                                                            โ”‚
โ”‚  Tool Calls:                 485 ( โœ” 441 โœ– 44 )                                                                              โ”‚
โ”‚  Success Rate:               90.9%                                                                                           โ”‚
โ”‚  User Agreement:             56.9% (58 reviewed)                                                                             โ”‚
โ”‚  Code Changes:               +4425 -44250                                                                                    โ”‚
โ”‚                                                                                                                              โ”‚
โ”‚  Performance                                                                                                                 โ”‚
โ”‚  Wall Time:                  5h 52m 33s                                                                                      โ”‚
โ”‚  Agent Active:               1h 50m 58s                                                                                      โ”‚
โ”‚    ยป API Time:               1h 13m 42s (66.4%)                                                                              โ”‚
โ”‚    ยป Tool Time:              37m 16s (33.6%)                                                                                 โ”‚
โ”‚                                                                                                                              โ”‚
โ”‚                                                                                                                              โ”‚
โ”‚  Model Usage                  Reqs   Input Tokens  Output Tokens                                                             โ”‚
โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                                                             โ”‚
โ”‚  qwen3-coder-plus              595     42,614,086        176,258                                                             โ”‚
โ”‚                                                                                                                              โ”‚
โ”‚  Savings Highlight: 38,564,864 (90.5%) of input tokens were served from the cache, reducing costs.                           โ”‚
โ”‚                                                                                                                              โ”‚
โ”‚  ยป Tip: For a full token breakdown, run `/stats model`.                                                                      โ”‚
โ”‚                                                                                                                              โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Yep, AI is great for making simple things complexโ€ฆ That thing is unmaintainable at a reasonable price.

1 Like

Itโ€™s not too bad. AI is not very token efficient, but the app is just 1000 lines of code and 600 lines of templates:

$ wc *.py
   35    92   834 config.py
  181   491  5571 crud.py
   75   192  2127 database.py
   71   155  1887 exceptions.py
  402  1189 14098 main.py
  106   255  3156 models.py
   38   127  1416 populate_cooked_fields.py
   80   237  2449 populate_cooked_fields_simple.py
   94   259  2469 schemas.py
   96   281  2592 utils.py
 1178  3278 36599 total

$ wc templates/*
   98   258  3943 templates/base.html
  103   278  3945 templates/edit_page.html
   29    71   911 templates/error.html
  144   389  5768 templates/home.html
  239   745  8177 templates/page_view.html
  613  1741 22744 total

Iโ€™m glad Iโ€™m not doing web professionally

https://www.mend.io/blog/npm-supply-chain-attack-infiltrates-popular-packages/

though, the same can happen with pythonโ€™s pip repositories, and perhaps other scripting languages Iโ€™ve never used

One reason so many go with ASP.NET