Altabel Group's Blog

Posts Tagged ‘Symfony 2

In the rapidly changing world of IT only those people win who are developing all the time: if you stop — you will lose. Besides general philosophy of life, it’s also true for CMS. Trying to keep up with the time the developers of CMS Drupal have released a new version of Drupal 8.

Many improvements have been made in the interface by default which makes it easier for non- professional users to use CMS. There is practically everything you need to build the “mid-level” web site without using additional modules. So, let’s observe some changes:

• From the very beginning probably the most sensational news was the transfer to Symfony 2 components, which greatly simplified the usage for those developers who are already familiar with it, but probably scared off those who are used to functional programming in WordPress. However, it should be noted that every time the page is loaded in Drupal 7, all enabled modules are also uploaded, even if we don’t need some modules on certain pages, which leads to unnecessary uploading and waiting time increasing for the user who is carefully studying the website. Implementing the basic principles of Symphony, Drupal 8 downloads only those modules that you need for a particular page and nothing more. It accelerates page loading for your visitors and probably reduces memory consumption.
 

 
• The introduction of HTML5 can be attributed to a significant improvement in comparison with XHTML in Drupal 7. Sites that are made by using HTML5 have a better structure and functionality. HTML5 provides better work for a user either on a computer or on a mobile device.

• Anyone who has ever run a website knows that it is better to use a computer or a laptop as most features of the admin section would require the resources of the computer and not work on mobile devices. The Drupal 8 Mobile Initiative is a concerted effort to make Drupal 8 a first-class mobile platform. Not only the admin section works on mobile, but the templates for Drupal 8 are also adapted for devices. It’s more comfortable not only for administrators but also for visitors who use gadgets.

• One more pleasant news was the improvement of multilingualism. Multi Language Module enables its users to create phrases in many languages and display them on your website. It helps developers and users to implement a multilingual website.

• Drupal 8 contains one of the fastest and most popular template engines. Twig is a popular templating engine for PHP, which opens the door to more robust, scalable and secure themes. It should be noted that Twig is fast, secure and flexible.

Fast: Twig compiles templates into optimized PHP code. The performance losses are reduced to the minimum in comparison with an ordinary PHP code.

Secure: Twig has a sandbox mode to test untrusted template code. It makes possible to use Twig as a template language for applications where users may modify the template design.

Flexible: Twig has a flexible vocabulary and syntax. It enables developers to define their own tags and filters and create their own DSL (domain specific language).

• With Drupal 8 you have an opportunity to use the Views without your developer. Views contain a set of parameters that determine which content appears on the page and choose the fields to display, field order, etc., In Drupal 7 Views module was a separate module and depended on the CT Tools Suite module. Development of the Views for Drupal (VDC Initiative) enabled to embed Views in Drupal core 8, so that it appeared immediately after installation. It means that Views has a better integration. Besides, Drupal 8 has made the Views much easier, now a site administrator can delegate the work with the Views to technical specialists, as it does not require complex skills.

These are just some of the changes that came with Drupal 8. It’s a fantastic platform for developing a wide range of sites, from simple to extremely complex.

Remember to feed back by sharing your discoveries and creations in using Drupal 8!

 

Kate Kviatkovskaya

Kate Kviatkovskaya

Business Development Manager

E-mail: Kate.Kviatkovskaya@altabel.com
Skype: kate.kviatkovskaya
LI Profile: Kate Kviatkovskaya

 
altabel

Altabel Group

Professional Software Development

E-mail: contact@altabel.com
www.altabel.com

Building software applications can be a complex, time consuming process, however utilizing a framework can help you develop projects faster (by reusing generic components and modules), and work better (building on one unified structural foundation). Using a framework also facilitates scalability and long-term maintenance by complying with development standards, keeping your code organized and allowing your application to evolve and grow over time.

PHP frameworks help you to write clean and reusable code. It follows the MVC pattern, ensuring a clear separation of logic and presentation. But there is a much discussion all around because some prefer performance, some prefer better documentation, some prefer amount of built-in functions etc.

Zend Framework 2 and Symfony 2 are the two frameworks that are often compared. Which one is more functional? Which one is more preferable in terms of productivity? Which one is better for general understanding? Let’s try to find the answers together.

Zend Framework 2

Zend Framework 2 is an open-source framework for developing web applications, using object-oriented code. The components in the standard library form a powerful an extensible framework when combined, offering a robust, high performance MVC implementation. It’s easily extensible, adapting to your needs, with a modular base so you can use building blocks in combination with other applications or frameworks.

Using the ZendService you can implement client libraries to access the most popular web services available. As Zend is a collection of classes, you can just load the components you need, to take advantage of the components as individual libraries, instead of the framework as a whole, cutting down on unnecessary project bloat. With no model implementation you are free to implement the framework and components in whatever way you need, free of predefined restraints.

Zend Framework 2 advantages:

– Modularity is perfected in it – it has beautiful ways to make your code modular and forces you into good design patterns to make it so;
– Some things are very well thought out: for example for each session container you can define its time-to-live and number of hops (page requests) it will last;
– Modules exist for a lot of things, which is always nice. However, most modules aren’t very mature so you won’t find a solution to every problem there, or you will have to reinvent the wheel because module’s author didn’t write it in the way that you would like;
– Things are abstracted away beautifully in this framework, which means you have a lot of control over everything.

Zend Framework 2 disadvantages are the following:

– There is no ORM implemented out of the box. While there is a solid query builder and ways to interact with database, if you want ORM you need to use third party modules;
– Documentation is written in a tutorialish manner, meaning information is dumbed down and simplified and lacks a lot of important stuff;
– So, the only way to really learn it is to browse the code. Zend does a great job of abstracting things away and letting you program by contract, but try digging into its code and you will find it hard to follow. The execution of code isn’t linear, it rather depends on events and forces you to adhere, so it’s very hard to follow what part of code is calling which event and what kind of magic happens to every object in the execution flow.

Symfony 2

Available in its version 2, Symfony is an excellent PHP Framework for creating websites and web applications. It has been built on top of Symfony components such as Drupal, Ez Publish and phpBB. Backed by a huge community of Symfony fans, it is believed that the framework will go to a whole new level in the forthcoming years.

Symfony is used to build high end web applications at reduced costs and development times. It is a native PHP 5 framework and makes use of the latest PHP 5. It helps streamline web application development by automating similar patterns in development. This essentially means that every time the same function is required, you need not re-invent the wheel. A framework makes the code more structured, better and maintainable.

Symfony2 has been tried and tested for a host of real world applications and business websites. The high demanding e-businesses or ecommerce businesses also prefer Symfony as a framework for development. Well, Symfony is also compatible with a number of databases that are used at the backend including MySQL, PostgreSQL, Oracle, and Microsoft SQL Server.

The advantages of Symfony 2 are:

– Symfony is feature rich. Both Zend and Symfony have a kitchen-sink approach, but Zend is much lower level;
– Symfony is expandable. Everything is presented as a bundle in Symfony. Each bundle adds functionality to the framework. These frameworks can be used for other projects too and functionalities can be added as per business requirements. Businesses benefit from the ability to add as many features and innovative features as required;
– It’s fast and takes us less system resources. Symfony was built to be fast. It is said that Symfony2 is three times faster than its predecessor Symfony 1.4 and Zend Framework too. It’s also a known fact that Symfony2 takes 2 times less memory. These are great performance statistics and businesses can easily take advantage of these to create high performing apps and ease business processes and work more efficiently;
– Symfony 2 is also known for its stability and sustainability. The framework is robust and can be used to create large enterprise websites too;
– The structure and code is very intuitive.

As for Symfony 2 disadvantages, we can say that Symfony 2 takes learning. Documentation is quite useful, but very tutorialish. You can’t dive into development without spending some hours reading first so you can figure out how to do it properly.

Conclusion

Both frameworks may be utilized for large websites or web apps, and both are excellent choices to develop either one. Symfony 2 is better for general understanding because with this framework it is easy to create new projects from scratch, and you can create your first prototype really quickly and advance from there on. While Zend Framework 2 feels over-engineered, written by people who know a lot about PHP but have developed very few sites in it, Symfony 2 feels very natural and has a solution to most common problems.

Zend Framework 2 and Symfony 2 belong to the same enterprise niche. Their quality and complexity is at the same level, and both of their functionality allows for highly professional web application development. However, in Altabel Group we believe that Symfony 2 is slightly better than ZF 2, according to a number of factors mentioned in this article.

Please feel free to share with us your thoughts what you choose for your projects – Symfony 2 or Zend Framework 2.

Thank you for your attention and looking forward for your comments.

mk

Marina Karabanova
Marina.Karabanova@altabel.com
Skype ID: m.karabanova
Business Development Manager (LI page)
Altabel Group – Professional Software Development


%d bloggers like this: