Welcome to the NanoMVC documentation. This guide will walk you through everything you need to know to start working with NanoMVC β a minimalist PHP MVC framework inspired by TinyMVC. Whether you're building a small web application or a lightweight API service, NanoMVC helps you stay organized with a clean separation of concerns.
NanoMVC retains the simplicity and clarity of TinyMVC while introducing modern touches and enhancements. Itβs perfect for developers who prefer control and minimalism over heavyweight frameworks.
Explore the following topics:
Learn the basic file structure of NanoMVC. Understand how the framework is organized and where your application files should go.
Learn how to install NanoMVC β from quick setup to shared installations. Follow clear steps for configuring your application and database.
Learn how controllers work in NanoMVC. Understand URL routing, method handling, default and root controllers, and best practices for organizing your application logic.
Learn how views work in NanoMVC. Understand view rendering, variable assignment and capturing output.
Learn how to use models in NanoMVC to handle data, interact with databases using PDO, and extend functionality with custom plugins.
Learn how to extend NanoMVC with plugins. Includes examples of loading libraries and scripts, using helper functions, and organizing reusable logic in your application.
Learn how to create a custom database plugin in NanoMVC by extending the built-in PDO class. Modify functionality and use your own logic while maintaining compatibility.
Learn how to extend NanoMVC core classes like NanoMVC_Controller, NanoMVC_Model, and NanoMVC_View to add your own custom logic and shared functionality across your application.
Learn how to autoload libraries, scripts, and models in NanoMVC so they are always available to your controllers without manual loading. Supports aliases and database pools.
Learn how to access the NanoMVC application instance using nmvc::instance(). Useful for working with controllers, views, and configuration outside the controller context.
Learn how to integrate template engines like Smarty in NanoMVC, including manual setup and creating reusable library wrappers.
Learn how to define a custom error handler in NanoMVC by extending the built-in NanoMVC_ErrorHandler class. Handle system errors and exceptions your way.
Learn how to customize the NanoMVC core safely by overriding NanoMVC.php without affecting the main core logic, preserving compatibility with future updates.
BlogMenu plugin lets you structure and retrieve blog categories and articles from your NanoMVC controllers using simple metadata.
Explore essential NanoMVC plugins like URI and Script Helper. Learn how to work with URL segments, perform redirection, debug variables, and send custom headers efficiently.
Explore public NanoMVC projects including the official documentation site and a developer's blog. Learn how to use NanoMVC through real-world examples.
Use the links above or scroll to read more. Whether you're new to MVC frameworks or transitioning from TinyMVC, this guide is your starting point.