#Sambhuti
##Requirements
- php5.4
- SPL library
##Setting up:
- After moving the sample app out it has become a little tricky to set it up. I will upload the sample app as soon as I find some time to finish it.
Discontinued.
License: GNU General Public License v3.0
#Sambhuti
##Requirements
##Setting up:
┆Issue is synchronized with this Asana task
┆Issue is synchronized with this Asana task
Default views in Sambhuti are supposed to have content generation capabilities.
There wont be any templating language like twig or smarty, just plain old variables with helper methods (accessible via $this)
They are supposed to have 3 levels of caching/generation capabilities.
Option 3 necessitates a different implementation at controller level as the cached variables are not supposed to be generated on each request saving time.
Eg: in a page, nav bar remains consistent while other elements like "welcome $user" are dynamic.
Nav bar changes slower than those elements, this calls for the need to have separate implementation for both to get maximum performance.
Usually this is solved at controller level by making a cache of generated content and making a check like
class controller {
function index() {
$cache = new cache('navstring');
if(!$cache->usable()) {
//lot of processing
$cache->save($data);
}
$this->response->add('nav',$cache->get());
//Add other variables which need to be processed on every request
}
}
With sambhuti you can have a separate method which is only called in the first run to let you set the caching variables which get cached directly into the template instead of having you write a separate caching mechanism.
We're yet to work out the details of this mechanism. Feel free to post ideas below :)
┆Issue is synchronized with this Asana task
┆Issue is synchronized with this Asana task
With the way templates were finally planned to work, we could really use callable typehint and traits can help make some modules unnecessary.
┆Issue is synchronized with this Asana task
┆Issue is synchronized with this Asana task
Basic commands like
$ cd /var/www/
$ sambhuti app my_site
$ cd my_site/
$ sambhuti configure database host=localhost user=dbuser pass=dbpass name=mysite_db
$ sambhuti generate models
And similar commands to generate controllers and views etc.
┆Issue is synchronized with this Asana task
Basic DAO models should be auto generated from the db schema.
Initially we can go with simple get by primary and unique keys of a table one giant save option and updates for all singular fields.
We have to find a middle ground between queries generated on the fly and php-generated classes.
The general structure of models right now is that every table has one class. We generate methods for basic CRUD with primary and unique keys.
Every generated model is saved as a base class and an empty class is made for the user to be able to edit to override/add new methods of their own.
TODO: add a pseudo code example here
┆Issue is synchronized with this Asana task
http://www.phptherightway.com/#code_style_guide
PSR-0 needs changing to loader. (To add "_" as directory separator)
┆Issue is synchronized with this Asana task
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.