Archive for the ‘PHP’ Category
If you love beautiful code and believe that development must be enjoyable, you’ve come to the right place. Let me introduce you Laravel, a web application framework of new generation. Don’t be skeptical, because it deserves to be noticed.
Laravel has become one of the most popular PHP framework. Laravel has changed the way many people write PHP for the better. It is a powerful MVC PHP framework, designed for developers who need a simple and elegant toolkit to create beautiful web-apps using elegant and expressive syntax. Currently, it is the most starred PHP project on Github and a lot of companies (including Altabel Group) and people all over the world use it to build amazing applications. In 2015 sitepoint.com conducted a survey to find out the best PHP-framework for developers. Laravel won in nomination of Enterprise Level Framework and Personal Project Framework.
You are here because you want to start your project on Laravel, and don’t know what course to take, right? Let’s get started.
Every framework has its own version history – it’s being maintained and updated. So every new version brings new functionality, some functions are changed or deprecated.
Laravel was created by Taylor Otwell in 2011.
- Laravel 1 was made available in June, 2011. It lacked support for controllers that prevented it from being a true MVC framework.
- Three month later Laravel 2 was released, bringing various improvements from the author and community. As a result Laravel framework became fully MVC-compliant.
- Laravel 3 was released in February 2012 with a set of new features including the command-line interface (CLI) named Artisan.
- Laravel 4, codenamed Illuminate, was released in May 2013. Laravel 4 version was the one which brought big popularity to Laravel framework, but it’s not updated anymore, and also it lacks a lot of functions released in Laravel 5.
There is an important term – LTS version, which stands for Long Term Support. It means that bug fixing for that version is to be provided within 2 years, until the next LTS version is released. For non-LTS versions bug fixing will take only 6 months, unless it’s a security fix which is carried out within1 year after a release date.
The first version to have that status is Laravel 5.1 (June 2015). According to the roadmap released by framework author, there should be a new subversion every half-year: Laravel 5.4 – Winter 2016, Laravel 5.5 – Summer 2017.
It’s quite important to know which version you will be using for your projects. For new ones it’s not advised to use Laravel 4.x version – you should use Laravel 5.x, probably Laravel 5.3 as the newest version at the time of writing this.
- The Laravel framework has a few system requirements: PHP >= 5.6.4, OpenSSL PHP Extension, PDO PHP Extension, Mbstring PHP Extension, Tokenizer PHP Extension, XML PHP Extension. This whole component kit’s presented in Windows OpenServer. Also make sure you have installed Composer on your machine.
- Here are the framework’s main features: bundles, eloquent ORM (object-relational mapping), query builder, application logic, reverse routing, restful controllers, class auto loading, view composers, blade templating engine, IoC containers, migrations, database seeding, unit testing, automatic pagination, form request.
- Using Laravel you can complete massive common tasks such as database migrations, queuing, authentication, routing, sessions, and caching with simplicity.
- Laravel has made processing with database very easy. It currently supports following databases – MySQL, Postgres, SQLite, SQL Server.
If you are familiar with HTML, Core PHP and Advanced PHP; Laravel will make your task easier. It will save you lots of time when you are developing a website from scratch. The website built in Laravel is also secure. It prevents the various attacks that can take place on websites.
Laravel offers a robust set of tools and an application architecture that incorporates many of the best features of frameworks like CodeIgniter, Yii, ASP.NET MVC, Ruby on Rails, Sinatra, and others. Laravel is built using Symfony, Doctrine, Faker, Carbon and other libraries. All of these components work flawlessly with Laravel.
1. Flexibility – there are many ways to complete one task.
2. Excellence – Laravel is the result of a long-term commitment to excellence, best practices, use of solid design principles, and the steady vision of the Taylor Otwell.
3. Evolution – each new Laravel version brings us more and more the new features which are worth trying.
4. Documentation – Laravel has beautifully written and comprehensive documentation. The Laravel forum also has many answers to common problems.
5. Official Packages – The Laravel framework has a number of extremely useful packages that we can add via composer that extend the framework.
Everything has its failings. And Laravel is not an exception.
1. Syntactic sugar – there is too much syntactic sugar in Laravel. Often you can face difficulties trying to maintain a unique build for your project code.
2. Juniors – Laravel attracts lots of newbies who can’t even cope with essentialities: framework documentation, composer and automatic loader.
3. Taylor Otwell – Why? Is it a real minus? Taylor alone determines framework future, e.g. he’s closed issues on Github, or he demands from developers to describe bugs through pull request, and so on. Yes, it’s okay from one side. But from the other – it’s not an open source.
- Forums. It’s the most common way to find an answer to about any problem.
- Podcast. You generally get a behind the scenes look at what’s coming down the road.
- Laracon. Laracon is a conference centered around the Laravel framework, covering its development, uses, and related general software development practices. Laracons are taking place in both United States and Europe, organized primarily by UserScape with additional help provided by a number of sponsors.
I recommend to anyone who wishes to learn the framework to get acquainted with above mentioned resources. It’s worth your time to do it.
I hope that this little introduction to the world of Laravel has shed some light and help you get some insights about it.
Laravel is an awesome framework to work with. It focuses on simplicity, clarity and getting work done. It’s designed to help you get started on building your own apps with Laravel. And Altabel Group will be happy to assist you with it. Remember, coding with Laravel is coding with elegance.
If you have any questions or comments, be sure to post them below and I’ll do my best to answer them!
Thank you for reading.
Business Development Manager
Professional Software Development
Over the years, PHP has evolved greatly and now it’s not just the most popular server-side scripting language but also the language used to build complex websites and web apps. The same could be told about its frameworks. PHP web frameworks have an ecosystem of their own in the world of web development. PHP frameworks are used to build websites and web applications of all sizes and complexity, ranging from small static websites to large scale complex enterprise content management systems.
Still there are different opinions on the question which PHP framework is the best, as some developers prefer performance, some prefer better documentation, some prefer lots of built-in functions, etc. Perhaps we should have a look at the frameworks depending how popular they are.
Different frameworks have been popular in different time. For instance, CodeIgniter framework remained the top choice for PHP developers from 2011 to mid 2014. However, later in 2014 a new PHP framework Laravel has gained its popularity and became the most used framework in 2015. Now in 2016 it is clear that the Laravel framework will remain at the top, due to the huge interest from developers and clients worldwide.
It’s already been said that Laravel is most famous PHP frameworks nowadays. It is very secure and have a lot of useful libraries like session, authentication, middleware, RESTapi and others are included in it. PHP developers choose to work on the Laravel framework because its large and gradually growing community and very good functionality. You don’t need to write more code because every basic and required code-blocks are pre-build on it. At the same time it’s mostly used by experts.
– Routing and middleware are the best feature of Laravel
– Laravel uses the blade template engine for generating various views
– Inherent Database Version control
– Built-in unit testing and simply readable impressive syntax
– Larger Community catering to thousands of progarmmers
CodeIgniter is the second most popular web framework among PHP developers. It is a lightweight powerful PHP framework that provides simple and elegant platform to create full-featured web applications. Choosing CodeIgniter you get all the tools you need in one little package. It’s easy to understand and to extend.
– Develop using MVC pattern
– No PHP Version Conflicts
– Less Duplication of Code
– Most Active Online Community
– Cache Class
– Security and Encryption
– Little to no server requirements
YiiFramework is the high-performance modern PHP framework. It attracts most of PHP developers due to its features like fast development, caching, authentication and role-based access control, scaffolding, testing, etc.
– Yii adopts the proven MVC architecture
– Yii allows developers to model database data in terms of objects and avoid the tedium and complexity of writing repetitive SQL statements
– With the help of Yii, collecting input extremely easy and safe
– Zero configuration required to let the task easier for you
– Thorough maintenance
CakePHP is also popular among PHP developers due to its lightweight, simplicity, faster and require less code. It is easy to learn with fast and flexible templating. The built-in CRUD feature is very handy for database interaction. The framework also has various built-in features for security, email, session, cookie and request handling. It’s perfectly suited for commercial applications.
– MVC Pattern – Model support data handling, with the model class you can insert, update, delete or read the data from the database.
– ORM features, converting data between incompatible type systems in databases and object-oriented programming languages
– Proper class inheritance
– Easily extend with Components, Helpers, Behaviours, and Plug-ins
No doubt, Symfony is a stable and sustainable PHP framework. It is a flexible, scalable yet powerful. It has a huge community of Symfony fans committed to take PHP to the next level. Symfony has plenty of reusable PHP components that can be used like security, templating, translation, validator, form config and more. It’s easy to install and configure on most platforms and it’s database engine-independent.
– Based on the premise of convention over configuration–the developer needs to configure -only the unconventional
– Compliant with most web best practices and design patterns
– Enterprise-ready–adaptable to existing information technology
– Stable enough for long-term projects
No doubt, some of our readers will either agree, disagree or have other PHP Frameworks, which they consider the best. But that’s already nice that you’ve read this post and perhaps could contribute to it. So please feel free to add a comment or through light why this or that framework is so popular and why it should or shouldn’t be 🙂
Senior Business Development Manager
Professional Software Development
The competition in the server side programming department is getting tougher with each month, especially with the recent popularity of NodeJS. However let`s look how everything began.
PHP appeared about 20 years ago, in 1995 and ever since then it has been a number one language for back-end developers and has gathered a big community behind it. For a long time there wasn’t any good reason why not to use PHP: it`s rather easy to use PHP, it`s supported by the majority of hosting companies and it has become the most commonly used language in terms of number of websites powered by it.
Of course, everyone has his own truth: one coder will praise the speed of NodeJS while the other will be devoted to the stability and long history of PHP. But let`s have a look at strong sides of both for you to decide whether to concern yourself with the so popular nowadays NodeJS or not.
PHP strong sides:
– Huge community and tons of materials for all programmers, from a beginner to an advanced coder.
– Deep code base. The most popular platforms for building websites (WordPress, Drupal, Joomla) are written in PHP. Not only are the platforms open source, but so are most of their plug-ins.
– Easy to find a hosting company. PHP has been the industry standard since the stone age and any hosting company still surviving is bound to be compatible with it. For Node.JS you still need to make a little research.
– Simplicity. PHP can be run inside of the same file as html.
– Speed of coding. For most developers, writing PHP for Web apps feels faster: no compilers, no deployment, no JAR files or preprocessors — just your favorite editor and some PHP files in a directory.
– Mixing code with content. You just open up PHP tags and start writing code. No need for templates, no need for extra files or elaborate architectures.
– No client app is needed. All of the talk about using the same language in the browser and on the server is nice, but what if you don’t need to use any language on the browser? PHP is a way out.
NodeJS strong sides:
– Speed. NodeJS is blazing fast compared to PHP. This is where Node really kicks assJ.
– Separation of Concerns. NodeJS separates fundamental components up giving a clear separation of concern across controllers / routes, models and views.
– New and fresh. It’s newer in comparison to PHP and has been developed by programmers who have full knowledge and understanding of modern web applications, from the server to the client, and that means more modern features.
– JSON. NodeJS is a powerhouse for JSON. Accessing SQL is possible and there’s plenty of plugins that make it possible, but JSON is the lingua franca for interacting with many of the latest NoSQL databases.
– Gridlock. NodeJS uses a callback structure to pass logic from one asynchronous call to the next meaning we never have to worry about spawning new threads or even considering the deadlock process. Almost no function in Node directly performs I/O, so the process never block which is a major implication for scalable systems.
That is a difficult decision when it comes up to decide which language or tool to choose. But NodeJS worth considering and it`s proved by the fact that Node is getting more and more popularity every day. And what is your opinion on NodeJS, is it the future of web?
Building a website wasn’t so easy earlier as it is now. Fortunately the time has passed when you had to hand-code HTML and PHP scripts in order to get an easy and fully functional website. Now content management systems (CMSs) do most or all of the heavy lifting for site creators. There are a number of CMSs for serious site creators, but the most common for websites today are considered to be three open-source tools: Joomla, Drupal and WordPress.
WordPress is a free and open source blogging tool and a CMS based on PHP and MySQL. It got its start as a blogging platform in May 2003 and gradually evolved, first into a blogging system that let users add Web pages outside of the blog and then into a full-featured, popular CMS. Of the three most popular open-source CMSs – WordPress, Joomla and Drupal – WordPress is both the most popular and the fastest growing by far, according to Web technology tracker W3Techs.
Earlier anyone could hardly think of using WordPress as the blogging platform. But now the situation has changed completely. Every second site owner using a CMS chooses WordPress. But to be objective let’s see what the facts are that speak in favor of this star-CMS. And what are there against it?
It means you get access to its source code and can study, modify and improve it according to your needs. However, it doesn’t mean you can do anything at all with the code. WordPress is issued under GPL license, which restricts certain actions (like limiting access to the code for others etc).
* Installation doesn’t cost anything
However, you may need to pay for customization, app development, premium themes etc, but the basic installation is at no cost.
* Easy set-up
That’s not even advertised anymore. It is simple and it is also quick. WordPress is known for 5- minute’s installation time.
* “Friendliness” with users
What can be a better way to gain popularity among users that become friends with them? WordPress is well suited for all types of users, even those who had never suspected a site can possibly have a backend. If you are able to google WordPress site and register your account, if you know how to use a text processor, you’re sure to get well with your new WordPress blog or website.
* No problems with customization
With the number of free themes and plug-ins for adding functionality to your site bigger than in any other CMS, a user gets the rich choice of website appearance and features that don’t come by default. And their integration is usually as easy as installing WordPress itself.
* Community support
WordPress has the enormously big community of users – from new born WordPressers to seasoned pros. They do great job helping each other via community support forums and discussion boards. Apart from that, WordPress provides exhaustive documentation on every possible issue, to ease the life of its followers.
* Multisite feature
WordPress allows its users not to be limited with just one website or start every new site with the new WordPress installation. With Multisite feature that’s available with all versions starting from WordPress 3.0 you can manage your several sites within one admin interface. However, to use this feature successfully, you need to study the WordPress codex well and have certain administration skills.
The security of WordPress leaves much to be desired, as with majority of open-source software. The thing is, when anyone gets access to the code, it’s easy to find flaws in it and use them to get into a site. But it doesn’t mean you’ve got to buy the most expensive software, you just need to use the techniques to enhance the protection of your site integrity.
– Advanced theming/features
If you know no HTML and coding and are satisfied with the looks of your blog by just switching to a new theme – you’ll be fine. If you desire to start off by changing everything to your taste – you may be in need for professional help. As to adding more functionality to your site via various plug-ins, in most cases, the common ones work out great, but if you experiment too much with them, you may get stuck when one plug-in is not compatible with the other, some need upgrade and some require tweaking the code to work correctly.
– Maintenance Costs
Although considered one of the most affordable CMSs, WordPress still may require money to be running successfully. For example, you pay for hosting, if it’s not self-hosted, exclusive themes or plug-in development in case nothing free suits you.
WordPress: what to expect?
During 2012, WordPress didn’t undergo any major changes. There wasn’t much new in WordPress 3.4 except easier theme customization. WordPress 3.5 had a mildly different new theme, some media improvements and not much else. In contrast, WordPress 3.6, which is set for a release sometime in April-May 2013 feels like a big step forward. There’s a bold new theme and several useful new features.
• Twenty Thirteen:
Twenty Thirteen will be the new default WordPress Theme with increasing support for post formats. Unlike previous default WordPress theme this theme is going to have lots of bold colors and will be fully responsive.
• Navigation Menus:
Lots of beginners complain that WordPress Menu system is quite hard to understand. In WordPress 3.6 this navigation menu options have been simplified and it will become easier to create and manage Menus in WordPress.
• WordPress Post Formats:
In WordPress 3.6 there will be a new User interface for Post Formats and theme authors will also have access to template the individual functions to change the structured data.
• WordPress Auto Save:
There will be some great enhancements related to Auto Save function. Posts are now auto saved locally so if the browser crashes, the server goes down or internet connection fails you will not lose the post and you will be able to resume editing right where you left it.
• WordPress Post Revisions:
Upcoming WordPress version will be a better handler for your post revisions. The changes will be highlighted with different colors so you can modify the usual things easily.
• Post Lock:
WordPress 3.6 will have a better editorial feature built in called Post lock. It will allow the authors or website administrators to lock a post to kick other person out of the editing and gambling between posts.
No site or platform is perfect, but WordPress has so much to offer and is very easy to use. In my opinion, the advantages outweigh disadvantages and with new version of it things are only getting better. Do you agree? Are there any other pluses and minuses of WordPress that are essential in your opinion and that I didn’t mention in the article? I’m eager to see your comments🙂
When planning the application you have to choose the right programming language to make your application work appropriate. The choice depends on many factors you need to consider. Such as but not limited: you need to think over on what platform the application will run, how easily new features would be added to the existing platform, the code size, performance, support and community etc.
There are various web programming languages and selecting the right one makes a website function properly. In my article I would like to focus on three of them, so called three “P”: PHP, Perl and Python to answer which of these languages is the best one.
Let’s have a look at them and try to make a comparison analysis
PHP – is free of charge open source scripting language and widely used in web environment. The best advantage of PHP is that it is easy to learn and easy to use. It is flexible and used for developing from small websites to giant business and organizational websites. Most common are informative forums, chatting platforms, CRM solutions, e-commerce shopping carts, community websites, e-business, shopping carts.
In terms of efficiency it is executed by the server and server parses the code at its source, executes and send properly formatted html to the client computer. Therefore it increases the speed of PHP applications.
What concerns the advantage of running, PHP is multiplatform language and compatible with all operating systems and platforms.
Being open source language, a large group of PHP developers help in creating a support community, so it’s maintained and when bugs are found, it can be quickly fixed.
A lot of websites including such giants as Wikipedia, Yahoo!, Facebiook, Digg, WordPress and Youtube are written in PHP. The popularity of PHP is based on its simplicity and coding style that is quiet easy to understand.
Nevertheless, the simplicity in developing, precisely principle so called «structure is not important» in PHP has its reverse side, precisely it’s hard to maintain for large applications since it is not very modular.
Also it’s weak in terms of security since its open source, all people can see the source code, and if there are any bugs it could be used to explore the weakness. About 30% of all vulnerabilities listed on the National Vulnerability Database are linked to PHP. The last summary on vulnerabilities you may find following the link: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-0427
Perl –refer to all purpose languages. Perl was developed as a text editor for converting or processing large amounts of data for tasks such as creating reports. Nowadays it intended improvements and suited for web development, game programming, GUI development, popular among system administrators etc.
The Perl reusable code structure provides flexibility in apps development and at the same time creates the problem of code reading after. As there are so many ways to do, there are a lot more ways to mess up in what you’ve done. If the code was written without proper care, the reading could even take 6 months.
So from one hand Perl is a good language for small programs because of its messy syntax structure it’s hard to write and maintain large programs. On the other hand if you’re planning to develop big web application you need to consider good coordination between developers work on discussing the code stile, mentoring and managing work in the team.
In respect of vulnerability Perl takes the second place – 9.4%. I assume that it’s not bad taking into consideration its complexity and its long history.
It has fallen out of popularity lately a bit because of the slow development of Perl 6. Most people still use Perl 5.
Python – is considered to be very elegant programming language. It’s general purpose, high level programming language. On the one hand Python’s syntax and semantics are minimal; on the other it has complex standard libraries.
Python supports multiple paradigms: object-oriented, imperative and functional programming styles and has features including fully dynamic type system and automatic memory management.
In comparison with Perl Python is easy to read language. And its key idea is vice versa “there should be one—and preferably only one—obvious way to do it”. It means that the code written by one developer could be easily developed and supported by the others. Besides to delimit blocks Python uses whitespace indentation, rather than curly braces (C, C++, ….) or keywords (Delphi).
Python is often used as a scripting language, but is also used in 3D animation (Maya, Softimage XSI, Blender) and image editors (GIMP, Inkscape, Scribus, Paint Shop Pro). It was also used for writing several video games.
Python is actively used by Google, Yahoo!, CERN and NASA. But it has problems with popularity, precisely with spreading. The reason is that it’s less simple than PHP. Working with Python you need to learn numerical libraries. So that’s why some people prefer choosing PHP instead of Python. But only the betrayed ones could explain why they choose Python, the answer is easy the development on Python is faster on 30% and his vulnerability consists only 0.67% against 36% of PHP.
PHP at first sight seems to be a leader in this so called comparison race. It’s simple, easy to learn and efficient for building small and middle size websites. Going further with analysis in terms of scalable large system it turns out that here Python will perform better than PHP. The reason is in readability that makes Python easier to maintain and extend. Besides, Python is object-oriented. PHP is not. Moreover, Google supports Python with its Google App Engine where web sites can be hosted on Google’s server for free. What concerns Perl, analysis showed that it’s simple programming language with cross platform running and open source modular architecture that provides to develop interesting things. If the task is to perform administration scripts Perl is much better to use here than PHP.
After the analysis it follows that the choice any of three P is a good choice. Also it means that for a certain purpose there is a right tool to choose. Besides the analysis showed that all three “P” have in common the following:
• are cross platform;
• have open source code;
• have well written documentation;
• have large user communities;
• extend libraries and big amount of code written;
• have high-level frameworks (PHP – Symfony, php.MVC; Python-Django, CherryPy, Pylons; Perl -Catalyst, CGI::Application, Gantry);
So I hope that summary based on technical analysis we made could help to make a right decision in future web projects you might have.
Thank you for your attention and if you have anything to add, please feel free to leave a comment.
Business Development Manager
Professional Software Development