How web2py/py4web works
Main Components Identification
The system should be divided into these core components:
a) Core Framework Layer
• Request/Response Handling (based on ombott)
• Routing System
• Template Engine (YATL/Renoir)
• Database Abstraction (pyDAL)
• Authentication System
• Session Management
• Asset Management
b) Dashboard & Admin Interface
• File Editor
• Database Administration
• App Management
• Security Controls
c) Application Layer
• Multiple Apps Support
• Static Assets
• Templates
• Controllers
• Models
Specific Implementation Details
Technical elements:
Client Layer
• ↓ HTTP/HTTPS
Server Layer (Multiple Adapters)
• ↓ [wsgiref, tornado, gunicorn, gevent, etc.]
Routing Layer (ombott-based)
• ↓
Core Framework
• → Template Engine (YATL/Renoir)
• → Database (pyDAL)
• → Auth System
• → Session Handler (JWT/DB/Redis/Memcache)
• → Asset Manager
• ↓
Applications Layer
• → _dashboard (Admin Interface)
• → _default
• → user_apps
Technical Details
• Server adapter options
• Template syntax ([[...]] delimiters)
• Session storage options
• Authentication methods
• Static asset versioning (/{appname}/static/_0.0.0/{path})
• Cache implementation (memoize)