» Home » News

Project News

Latest interesting repository changes
submitted by pachanga on 29.03.2008 18:30

Hi! There have been some quite interesting code changes in the repository lately.

Kulyamin "svk" Sergey fixed bugs in the PostgreSQL driver and added experimental support for the Linter database driver in limb/dbal package. Sergey also proposed interesting idea regarding SQL statement execution optimization and after a couple of days the patch was committed. And, finally, svk patched limb/mail package adding capability of images embedding into mail body.

Vasin "vasiatka" Alexey added convenient {{flashbox}} tag for {{macro}} template into limb/web_app package. Here are some possible usage examples:

{{flashbox}}       
{{list ....}}
.....
{{/list}}
{{/flashbox}}
{{flashbox as='$flash'/}}       
{{list using='$flash'....}}
.....
{{/list}}

I added a runtests.php script into repository which should simplify tests execution for Limb3 packages. The key idea is to allow running tests right after the code checkout, something as follows:

$ svn co https://svn.limb-project.com/3.x/trunk/limb limb 
$ cd limb
$ php runtests.php #run tests for all packages
$ php runtests.php core macro cache #run tests only for specific packages

In order to make all this possible package tests should be as independent as possible. Fortunately, limb/tests_runner allows to achieve this using proper .setup.php and .skipif.php scripts. The work in this direction is still in the process.

Stanislav "korchasa" Korchagin added {{tree:empty}} tag(analogue of {{list:empty}}) and expanded lmbHttpResponse functionality for more fine grained cookie control in limb/macro and limb/net packages respectively.

And last, but not least, Sergey "syfisher" Yudin fixed lmbSet in limb/core package for edge cases when working with arrays containing "false" values.

Good job, guys, keep your patches coming ;)

"Projects" section moved into "Code Bits"
submitted by pachanga on 11.03.2008 08:10

Projects section previously located at http://projects.limb-project.com was moved into Code Bits which is located at http://bits.limb-project.com. The new name reflects the idea behind this section in a better way and the url is more concise and less verbose to type. BC is preserved, of course, the old section redirects to the new one.

{{macro}} on-line usage examples
submitted by pachanga on 03.03.2008 22:15

Sergey Yudin(syfisher) did really great job by making {{macro}} template engine examples available on-line.

The mentioned page has runnable examples for mostly all core {{macro}} tags. You can browse the template rendering result page, template sources and PHP code which actually works behind the scene.

You can also download the source code of these examples from projects page(where, by the way, you can find some other real life Limb3 usage samples).

We are going to update examples on the regular basis presenting other interesting {{macro}} usage patterns in the future, so, if you are interested, stay tuned.

limb/active_record experimental eager fetching support
submitted by pachanga on 24.02.2008 23:55

Sergey Yudin(syfisher) has added an experimental support for eager fetching in limb/active_record package. Simply put, eager fetching technique greedily grabs as much as possible useful information into memory from database(which is opposed to lazy loading, the default limb/active_record behaviour). This allows to dramatically reduce the amount of additional SQL queries in some cases when lots of interconnected objects are fetched.

For example, in the code below for each Lecture object there will be an additional SQL query selecting its Course object(one-to-many relation)

  $lectures = lmbActiveRecord :: find('Lecture');
foreach($lectures as $lecture)
echo 'Lecture '$lecture->getTitle() . ' of ' . $lecture->getCourse()->getTitle() . " course.\n";

Thus, if we have 5 Lecture objects having different Courses, there will be 1+5 queries total.

The code above can be rewritten using eager fetching:

  $lectures = lmbActiveRecord :: find('Lecture', array('join' => 'course'));
foreach($lectures as $lecture)
echo 'Lecture '$lecture->getTitle() . ' of ' . $lecture->getCourse()->getTitle() . " course.\n";

Now there will be only one SQL query fetching all Lecture and connected Course objects using LEFT JOIN construct

limb/active_record currently supports two types of eager fetching: joining(used in the example above) and attaching.

Eager joining

Eager joining can be only used for has_one, belongs_to and many_belongs_to relations. This limitation is due to the fact this type of eager fetching uses LEFT JOIN infrastructure. Nested eager joins are supported as well:

$lectures = lmbActiveRecord :: find('Lecture', array('join' => array('course' => array('join' => 'program'))));

There will be only one query made in this case:

SELECT lecture.id AS id, lecture.title AS title, lecture.course_id AS course_id, 
course.id AS course__id, course.title AS course__title, course.program_id AS course__program_id,
course__program.id AS course__program__id, course__program.title AS course__program__title
FROM lecture
LEFT JOIN course AS course ON lecture.course_id = course.id
LEFT JOIN program AS course__program ON course.program_id = program__course.id
Eager attaching

Eager attaching is a more general and a bit more slower operation than eager joining. Eager attaching makes an additional query for each relation(not object!) limiting the amount of fetched data with WHERE .. IN(..) SQL construct. This type of eager fetching is compatible with any type of relation. Nested attaching is supported as well:

$programs = lmbActiveRecord :: find('Program', array('attach' => array('courses' => array('attach' => 'lectures'))));

There will be 3 queries done in this case:

SELECT program.id AS id, program.title AS title FROM program;

SELECT course.id AS id, course.title AS title, course.program_id AS program_id
FROM course WHERE program_id IN (...) ORDER BY program_id ASC;

SELECT lecture.id AS id, lecture.title AS title, lecture.course_id AS course_id
FROM lecture WHERE course_id IN (...) ORDER BY course_id ASC;

While there are some wrinkles yet to be ironed out(for example, proper Postgres support), eager fetching support has been already successfully tried on a couple of projects.

Want to be on the bleeding edge too? Go for it - try the SVN version of limb/active_record package!

{{macro}} include and wrap tags unification
submitted by pachanga on 24.02.2008 23:10

We have unified {{include}} and {{wrap}} tags for the {{macro}} templating engine and now it's possible to use only one tag for both of these operations. Meet the new experimental tag {{insert}}!

Here's the sample usage:

  • Simple static include:
    Hello, {{insert file="foo.html"/}}
    foo.html
    Bob

    result:
    Hello, Bob
  • Simple dynamic include:
    Hello, {{insert file="$file"/}}
    foo.html
    Bob

    result(if $file == "foo.html"):
    Hello, Bob
  • Simple static wrap:
    {{insert into="slot1" file="foo.html"}}Bob{{/insert}}

    foo.html
    Hello, {{slot id="slot1"/}}

    result:
    Hello, Bob
  • Simple dynamic wrap:
    {{insert into="slot1" file="$file"}}Bob{{/insert}}

    foo.html
    Hello, {{slot id="slot1"/}}

    result(if $file == "foo.html"):
    Hello, Bob
  • Static multi slot wrap:
         
    {{insert file="foo.html"}}
    {{insert:into slot="slot1"}}Bob{{/insert:into}}
    {{insert:into slot="slot2"}}Thorton{{/insert:into}}
    {{/insert}}

    foo.html
  •     Hello, {{slot id="slot2"/}} {{slot id="slot1"/}}

    result:
    Hello, Thorton Bob

If you are interested, go ahead and try the latest changes in {{macro}} SVN repository.

P.S. By the way, {{include}} and {{wrap}} tags don't really exist anymore, they are just aliases for the {{insert}} tag.

Limb3 2007.4(Frozzy) Released!
submitted by pachanga on 31.12.2007 14:25

Happy New Year and Merry Christmas!

It has become a good tradition of the Limb core team to release new packages of Limb3 framework right before the new year, well, this time is not an exception ;)

We are really proud to announce the immediate availability of the Limb3 2007.4(Frozzy) release!

Here's the list of the most notable changes:

  • ACTIVE_RECORD package: better error and invalid fields handling using exceptions, support for different names of primary keys added
  • CORE package: cruft cleanup, refactoring and misc. code optimizations
  • CACHE package: cleanup and better implementation, added initial APC and Memcached support
  • DATETIME package: refactoring, renaming lmbDate into lmbDateTime, etc
  • MACRO alternative to WACT templating engine added with almost all WACT alike functionality(and even more!)
  • IMAGEKIT package: complete redesign using filters and fluent interfaces
  • TESTS_RUNNER package: test groups and methods filters, better coverage support
  • JS package: upgraded jQuery to 1.2.1
  • MAIL package: upgraded phpmailer to 1.73
  • WEB_APP package: major cleanup, removed all commands and obsolete controllers
  • VIEW package: support for view selection based on template extension added(currently MACRO and WACT)
  • TREE package: ArrayAccess and ArrayIterator compatibility fixes
  • FS package: more generic iterators added

This is rather a general changelog, see packages for more details.

The bundled release of all packages is available in the SourceForge downloads section of Limb3-2007.4

I'd like to thank syfisher, william, alex433, korchasa, CM-Z, svk, 3d-max, To LST ld й for their numerous contributions. This release wouldn't have been possible without you guys!

Cheers!

TESTS_RUNNER-0.8.6(beta) Released!
submitted by pachanga on 07.11.2007 13:20

We are glad to announce the new release of the TESTS_RUNNER package which ships with limb_unit - a SimpleTest tests "swiss army knife" console based runner.

The CHANGELOG for this release is as follows:

  • -- adding test cases filtering by group annotation(TR-18), e.g:
    $ limb_unit --groups=db,auth sometest.php
  • -- adding test methods filtering(TR-20), e.g:
    $ limb_unit --methods=testFoo,testBar sometest.php
  • -- lmbTestOptions added, it will be used as a global container for all options
  • -- better configuration file(passed with -c option) invalid syntax checking
  • -- fixing coverage summary output without generating html reports

This release introduces some unique features which can be quite useful for large sets of tests. They are test class annotation groups selectors and test methods filtering.

Annotation groups selector allows you to execute only those test cases which have some specific @group annotation tags. For example, running the following command:

$ limb_unit -G db,auth test1.php test2.php
...will yield executing only those test cases from test1.php and test2.php files which have @group annotation tag matching "db,auth" filter, e.g:
/**
* group db
*/
class MyTest1 extends UnitTestCase
...
/**
* group auth,db
*/
class MyTest2 extends UnitTestCase
...

Test methods filtering allows to run only those test methods which match the passed filter. For example, the following command:

$ limb_unit -M testFoo,testBar test.php
..will execute only testFoo and testBar methods omitting the rest ones found in all test cases in test.php file.

TESTS_RUNNER package can be installed via Limb pear channel using the shell commands below:

# pear channel-discover pear.limb-project.com 
# pear install limb/tests_runner-beta


Update: Just a couple of days after this post TESTS_RUNNER-0.8.7(beta) was released. It features new test class filter that allows you to run only those test classes that match this filter, e.g:
$ limb_unit -T FooTest,BarTest alltests.php
New site section: projects.limb-project.com
submitted by pachanga on 24.07.2007 17:25

Hi!

We have introduced new site section - projects.limb-project.com.

This new section will contain not just examples but Limb3 based applications and tools as well. All previous examples from examples.limb-project.com were moved here too.

The first candidates listed in this new section are Syncman, Buildman applications and limb_unit testing utility. And we believe there will be more Limb3 based projects coming quite soon.

Old examples section is now considered to be obsolete, however it will be accessible for a while.

Syncman and Buildman applications gone public
submitted by pachanga on 23.07.2007 17:30

Hi, folks!

We have made two Limb3 based applications Syncman and Buildman available to the public.

syncman

Syncman is an application which simplifies projects remote deployment and synchronization by providing both nice web UI(great for managers and other non-technical personnel) and basic shell interface.

Features:

  • Nice web UI for non-technical personnel
  • Simple file based projects configuration
  • Public keys infrastructure for secure passwordless authentication
  • Efficient rsync based synchronization(but not limited to rsync)
  • Subversion integration
  • Pre- and Post-syncing hooks support
  • Shell based interface

buildman

Buildman is a simple tool which helps to easily establish a Continuous Integration process for your applications.

Features:

  • Simple file based configuration for CI projects(no XML)
  • Shell based build process invocation
  • Build errors mail notifications
  • Subversion repository support
  • Customizable layout templates

Both applications are in alpha state and there are no file releases yet. You can download the source code for both applications only via svn. However we have been using these applications for quite some time and they proved to be quite useful and stable.

If you have any interest in contributing to any of these projects we'll gladly accept any help, suggestions, patches, etc.

Limb3 Skeleton, CRUD, Shop applications on SF!
submitted by pachanga on 19.07.2007 17:40

Limb3 Skeleton, CRUD and Shop applications are now released on SourceForge as separate packages. Check out Limb3 SourceForge file releases section!

In a nutshell, these applications are:

  • Skeleton - empty Limb3 based application which can be used as a skeleton or a playground
  • CRUD - a very basic Limb3 based application(now using SQLite database by default)
  • Shop - simple e-shop based on Limb3(using SQLite by default as well)

CRUD and Shop applications have been available in the examples section for quite some time while the Skeleton application is released for the very first time.

Limb3 2007.3(Grassler) Released!
submitted by pachanga on 11.07.2007 16:00

After 4 moths of hard working we're proud to announce the availability of the Limb3 2007.3 bundle release!

The main features of this release are:

  • PHP-5.2 compatibility
  • lmbActiveRecord better inheritance and value objects support
  • DATASOURCE package cruft cleanup and unification
  • merge of DATASOURCE and CLASSKIT packages into CORE package
  • new FS package(merging FILE_SCHEMA and UTIL packages)
  • new LOG package(extracted from ERROR package)
  • TREE package code overhaul and new features(nested sets driver is available again)
  • more friendly error subsystem
  • form errors better implementation
  • TESTS_RUNNER improved CLI and phpSpikesCoverage support
  • LIMB_VAR_DIR dependency removal from base classes
  • reimplementation of CALENDAR package using better JavaScript alternative
  • DATETIME package cleanup and misc improvements
  • initial TinyMC support in WYSIWYG package
  • FCKEditor updated to 2.4.2
  • WACT better expressions support
  • SQLite DB driver
  • DBAL package refactoring and cleanup, lmbDBAL is a central facade for accessing mis. tools in a package
  • JS package cleanup, moving to jQuery instead of Prototype
  • more isolated packages tests

Please note, this is a general changelog, if you need more detailed changes consider viewing changelog files for each package.

Download this release from SourceForge Limb3 releases section.

TESTS_RUNNER-0.8.3 Released!
submitted by pachanga on 06.07.2007 15:55

Folks, we have released TESTS_RUNNER-0.8.3 Limb3 package which aims to simplify running your SimpleTest based tests. This package provides limb_unit utility which is an advanced SimpleTest tests runner.

limb_unit is similar in some ways to phpunit utility from PHPUnit library, yet more powerful we believe.

The main features of limb_unit are:

  • Can run single tests as well as tests under specified directory recursively
  • Hierarchical tests fixtures
  • Conditional tests execution
  • Tests code coverage

limb_unit is shipped with Limb3 TESTS_RUNNER package and can be installed via PEAR channel. Here's an example of quick installation:

# pear channel-discover pear.limb-project.com 
# pear install limb/tests_runner-beta

Some quick usage examples for the impatient:

#running all test cases defined in my_test.php 
$ limb_unit my_test.php

#running all test cases contained in *_test.php files
$ limb_unit *_test.php

#running recursively all tests from tests directory
$ limb_unit tests

#running all tests from any directories called tests
$ find -name tests -type d | xargs -i limb_unit "{}"

#run tests and show tests coverage for source code in src directory
$ limb_unit -C src tests

Actually limb_unit can do a lot more than that ;) If you feel interested here's a more detailed documentation.

New site section: Examples
submitted by pachanga on 21.03.2007 14:40

We're proud to announce the new site section - Examples!

This site section will contain miscellaneous Limb based examples ranging from simple code snippets to pretty complicated applications. All examples will be available for download(currently directly from repository) and for on-line browsing.

Currently the following examples are present:

  • CRUD - very basic Limb3 based application
  • Shop - simple e-shop based on Limb3
  • WACT examples - Limb3 WACT fork template usage examples(based on examples from original WACT)
  • limb-project.com - sources of limb-project.com site

Enjoy!

New Continuous Integration Server
submitted by pachanga on 27.02.2007 16:45

We have completely reimplemented our nightly builds server and now it's almost a full fledged Continuous Integration server. 'Almost' because some important features are still missing: RSS build feeds, mail notification, to name a few. However this is a much better and more flexible solution than it used to be.

This is how it works in a nutshell. Every night all packages are checked out from the repository and unit tested with each package's tests. If all tests for the certain package pass the build is marked successful(green) otherwise failed(red).

Either way, successful or not, each build is assigned some unique identifier, archived and published into web accessible directory. Up to 3 last package builds are stored and you can browse each build's CHANGE.LOG and BUILD.LOG files to see latest changes and complete log of system messages including errors.

We also plan to make 'on-demand' building of packages in the nearest future. This will be done via Subversion on-commit hook triggering the build process for the certain packages.

New Continuous Integration server is based on the buildman project built with Limb3. Once a bit more tested in production the buildman's source code will be available to the public.

New version of limb-project.com!
submitted by pachanga on 02.02.2007 19:00

Welcome to the redesigned version of limb-project.com which is based on Limb3 framework!

The new version of limb-project.com will be placed into Limb repository as an example Limb3 based project in a couple of days.

The old version of the site will be available for some time at old.limb-project.com.

Forum and wiki have been moved into sub-domains
submitted by pachanga on 02.02.2007 18:55

You have probably noted that wiki and forum have been moved into sub-domains: wiki.limb-project.com and forum.limb-project.com respectively. This should allow us to spread the load among different servers in the future.

Old forum and wiki links should work just fine via Apache mod_rewrite module, so we hope you won't have any broken links issues.
Happy New 2007 Year!!!
submitted by pachanga on 18.01.2007 06:15

It's 2007! Fill your heart with new hopes, reach out for new opportunities and celebrate the New Year! Cheers!

The previous 2006 year was really full of exciting events for the core dev.team:

Firstly we finally managed to launch the Limb3 PEAR channel. We have high hopes for Limb3 and all our future efforts will be mainly focused on further development and improvement of Limb3 packages. We're pushing the PHP's limits with Limb3 and prove that PHP still can be a powerfull RAD tool despite to much PHP criticizing lately.

Secondly we released Limb2.4-rc1 stable release(well, almost stable since it's a release candidate) after more than one year of silence in this branch. We hope to release Limb2.4 final pretty soon and even though many developers still find Limb2 attractive we'd like to admit that there won't be much development in this branch in the future. The code base of Limb2 is pretty outdated and sometimes ugly, that's why we want to convert Limb2 into Limb3 package as soon as possible.
Limb3 PEAR channel was officially launched!
submitted by pachanga on 15.12.2006 12:45

After almost a year of hard working we're proud to announce the launch of PEAR channel for Limb3 packages! These packages should greatly simplify the process of developing web applications with PHP. One of the most interesting packages among them is web_app which allows you to develop web applications in Rails alike way using similar controllers, pretty flexible ActiveRecord powered model and excellent WACT based views.

These are the steps you're required to follow in order to install web_app package and all its dependencies:

# as of this writing PEAR 1.5 is required which is in alpha state
$ pear install PEAR-alpha

$ pear channel-discover pear.limb-project.com

# we're in alpha state too
$ pear install limb/web_app-alpha

The channel has a bit terse look right now however this is going to be fixed pretty soon. We're also working on providing automatic nightly builds of packages right from the repository.

The english documentation is mostly outdated but we're working on this issue as well(we're finishing the Russian documentation at the moment). However there are some simple examples in web_app package which, hopefully, should help you get started quickly.

We'd like to thank all core Limb developers for their great work and dedication to the project. It would never have happened without you guys!

Let it be a new year present to all PHP agile geeks ;)

Copyright © 2003-2007 BIT Бюро Информационных Технологий (ООО БИТ). Создание сайтов на собственной платформе Limb. Мультимедиа презентации. Дизайн.