Happy holiday, colleagues! And we've got a gift here. Well, or heavenly punishment. It is not clear yet. In short, we have strained, gathered, concentrated, and are ready to present a new version of our
Limb framework to the public. Well, the truth is not quite the version, but the second release candidate is 2010.1 RC2.
For those who do not know,
Limb is a PHP framework focused on fast and flexible development. Our priorities / flexibility - code quality - development speed.
Limb in one list:
- Paradigm - MVC
- DependencyInjection - Toolkit (imperative instantiation)
- Application Organization - InterceptingFilter
- ORM - ActiveRecord
- DBAL - own implementation (MySQL 4.1+, SQLite, Oracle (OCI8), PostgreSQL 8.2+, Linter)
- Template engine - Macro, WACT, Blitz, etc.
- Testing - based on SimpleTest
For those who can't wait to tear us to shreds with criticism and bug reports, please
pick up the code ,
arm yourself
with documentation and report, report, report.
And now more about what we have.
')
Limb Packages
Core - hearty
The package contains
global functions for deferred loading of code, work with environment variables, packages. In addition, it contains
basic data containers (sets, objects, collections). And all sorts of utilitarian things:
lmbArrayHelper for juggling arrays and collections,
lmbHandle , for those who like to postpone something for later and
lmbDelegate , for those who do not want to do it themselves, and prefer to delegate.
Toolkit - giving flexibility
Toolkit - implementation of the Dynamic Service Locator pattern, one of the methods of
Dependency injection . The bottom line is that there is some easily accessible object, which is a common point for access to all popular objects (services). It is a kind of glue that keeps the code from slipping into the abyss of static dependencies.
ActiveRecord, as it is easy to guess from the name, is one of the possible implementations of ORM (Object-Relation Mapping). The original package idea is taken from the Ruby-On-Rails framework. RoR in this case acted as a functional guideline. And that's what he can /
DBAL - data manipulating
Do not like ORM? But to you dbal! DBAL (DataBase Abstraction Layer) provides object-oriented access to the database, abstracting the details of a specific implementation. The DBAL package architecture is quite standard:
- Driver - base classes that abstract database access
- Query - a group of classes that allow one way or another to encapsulate SQL queries for different purposes (SELECT, INSERT, UPDATE, DELETE)
- Criteria - a group of classes that allow you to build conditions for SQL queries in object form
View, WACT and Macro - on the screen outstanding
Limb follows the MVC paradigm as a means of logical code breaking into relatively independent pieces. The View package represents the MVC layer of the same name, and is an abstraction from a specific template engine. At the moment, the main template engine in limb is Macro, replacing WACT. In addition, View supports Blitz, JSON and native PHP.
Macro is a kind of syntactic sugar for native PHP. We did not follow the path of helper, but remained true to tags and filters. Briefly about Macro:
- intermediate compilation to PHP code
- two scopes of variables / global and local (at the template level)
- filter mechanism
- templates are combined using include (child template inclusion), wrap (inclusion in the parent template) and template + apply (template application)
- slot concept supported
- ready-made tags for working with lists, trees, paging, forms and their fields, links and internationalization
- ready-made filters for various formatting of strings, numbers, dates and special formats
- expandable through our own tags and filters
WebApp and CMS - all this joy unites
Did I already talk about MVC? And here is the second part - WebApp. The package provides classes for implementing only the Controller component. The choice of means for implementing the model and the display still lies with the final developer of the application. On the other hand, the package is implemented in such a way as to simplify work with applications as much as possible, where the “native” Limb packages DBAL and ActiveRecord will be selected as the model, and the View package as the display tool. In general, twofold, and sometimes triple.
Do you want admin panel and its quick expansion tools? I have them - CMS package! Authentication, identification and other, means for quickly building CRUD interfaces, filters, forms.
The package for organizing and running SimpleTest tests for applications, with a large number of tests and complex multi-tiered fixtures. The package has no dependencies on other packages, so it can be carefully cut out of Limb with a jigsaw, for use separately.
And others
A list with all 37 (horror!) Packages . Here are the most important /
- CACHE (2) - abstractions from cache storage (files, APC, database, memory, sessions) and tools for working with caches (dog-pile protection, tagging and logging)
- CONSTRUCTOR - console code generator (models, controllers, admin)
- FILTER_CHAIN - implementation of the Intercepring Filter pattern, basics of Limb applications
- MIGRATE - synchronization of the database schema between developers and linking it to the code
- TASKMAN - we have our own Ant, yes
findings
1. Why did you write all this if it is not stable?
Actually, and wrote to make it stable. The more applications, the more stable the code. Some new packages (migrate, profile, constructor) seem raw to me, despite the fact that they are used in live projects. Well, the "new blood" in the development would attract.
2. Where to get it?
As I said, the
repository is located on GitHub, and you can also download
version 2010.1 RC2 code there .
3. Which side to bite him?
Well, a
small video of that was born and grew Limb.
PS: Please do not kick for mistakes, because on the threshold of this bright moment I haven’t slept for 30 hours. Write to me in lichku, and my portable clone of the Man-Gryzlov will quietly adjust everything.
ZYY: Once again with the holiday! Simple code, easy debugging and more happy insights that make our work a favorite!