I found the quickest way to learn how to use it was just install it. The code is commented very well and is quite expressive in it's syntax so looking up the docs has been, for the most part, an exercise in "what params does Str::limit take?".
I respect the work, but the samples look a lot like Symfony2, which has a huge community behind it. Sf2 has a learning curve but I'm not sure what problem Laravel solves that Sf2 (or its simplified kid brother Silex) doesn't already solve.
I came away thinking the same. Also, Laravel seems (from first glance at least) to lack the modular design approach of Symfony2 i.e. with Laravel you either take the whole framework or nothing at all - you can't selectively pick which modules you want. Another thing I missed was Silex's approach of using a minimal core and then relying on third party providers for functionality rather than re-inventing the wheel (e.g. Doctrine for db work, Monolog for logging and Twig for templating).
I agree. If someone wants to launch a new PHP framework in 2012, they should at least talk about some of the leading PHP frameworks (Symfony, CodeIgniter, CakePHP, etc) and say why those frameworks are not adequate.
Optionally, one could include a discussion of why one should use PHP, but I realize there is convenience and brevity to be gained from simply assuming you are talking to an audience that is already sold on PHP, rather than Java or Ruby or Python or Clojure.
Do all Java, Ruby, and Python frameworks include a discussion of why one should use those languages? Seems to me that when you're evaluating frameworks, the language decision is probably already made.
I know its not perfect, and has some little loved features. But for me a language is a tool. And tools are meant for specific jobs. Like I wouldn't use a phillips head screwdriver where a set of pliers is needed.
If php is to advance we should welcome all tools that evolve it.
I think a lot of people, even those who used/use some variation of 1.x, are unaware of the emergence of some really good bundles. I'll post two links about the Sonata bundles:
ditto. What problem does it solve? None, we don't need another framework! What we need is something that would save us PHP programmers more time than the MVC/Frameworks that are out there already do. How about a sleek CMS on top of Sf2 built on the bundles concept (it would have to be:), or a Magento replacement that integrates with the CMS and Sf2. That would get my attention.
I think you are missing the point. And if we all said such negative comments about something new we wouldn't have made much progress in moving forward. So it solves some problems that have already been solved. It is doing them in new ways and at the very least it is getting people interested and talking about PHP and web development. I am sick of working with CakePHP! I am sick of trying to work with old frameworks that still want to support PHP4! Looking at this framework, gave me new interest in PHP, gave me new interest in the new features offered in recent versions of PHP.
That and keep in mind there are many projects that don't need something like Symfony or Zend. A lot of projects that is the same thing as using a sledge hammer for a thumbtack. Something like Laravel gives me the tools to get a small project up and running quickly without having to do a lot of the mindless/repetitive tasks we all have to do with new projects.
Lastly, your "solution" that gets your attention is nothing new. It is not web development, it is installing software via a web interface. So you say what does it solve when really you are just asking for another e-commerce and CMS solution. Hmm, that hasn't been done thousands of times before...
Something I find really strange/frustrating with a few recent frameworks (Laravel included) is their overuse of static methods. You have these singletons floating through the framework which maintain state (Request, Session, Logging etc) but you can only ever access them statically. Seems like bad practise to me.
What if you want to swap out Request for a mock during unit testing; since you've hard coded the Request class throughout your controllers how would you switch to a RequestMock class? What happens if you were dealing with more than one request (e.g in a HMVC setup).
It looks interesting enough but a few things put me off:
1). Rolling its own ORM rather than using Doctrine.
2). YATL (yet another templating language). I wish the PHP world would just standardise on Twig.
3). Localisation seems a bit basic at the moment and it's a shame you have to define messages in a PHP array rather than something more portable like YAML.
4). Would have been great if it used Monolog for logging.
On the plus side, I like the clean design and their approach for events looks cool.
1). I'm not an ORM lover in general but, yes, if you're going to use an ORM and are basing your project on PHP, Doctrine is generally accepted as the best.
3). Personal preference I guess but I hate gettext. I much prefer the pattern of using labels in your template (e.g. menu.item1) and then looking up that label in the desired language file e.g. messages.en.yml. And I've never had a problem with translators working with YAML files (i.e. the syntax is easy for them to grok)
2). I really don't understand why we should use Twig : Smarty is older, why using yet another template engine ? Or I've got a better idea : we could use the template engine used in phpBB2 : he's older !
I'm agree that standardization would be just fine(c), and I like the Twig syntax, but I think the "YATL, we should use Twig" argument is not relevant.
This was what confused me. I look at the home page and the major features seem to be that it is well documented and has "bundles". That doesn't really tell me how it will make my development easy.
Its a good framework but the development cycle is far to fast. Every few months there is a new full iteration where core functionality is added and development practices change.
I feel it would be far more usable and popular if the dev cycle slowed and the framework was allowed to mature and gain some traction.
Taylor has only recently started working full-time on the framework and as a result has been able to "fill out" the framework with community-requested features at a quick pace. It's just a matter of time before it tapers off; there's no point in stagnating the development of such a young and novel framework for what IMO are silly reasons.
The omission of namepaces in the case of controllers was a calculated decision. PHP's implementation of namespaces is... inadequate, and would have required annoying workarounds, so prefixing controllers was the better evil.
How is PHP's namespace implementation inadequate? Use-as statements are the staple of every PHP library that uses namespaces, and this seems like a half-measure to placate less-experienced programmers.
Base_Controller is an optional controller in Laravel placed between the main Controller and the controllers you create. Normally you'll just extend the main Controller which is namespaced;
Laravel looks nice but I agree the internal/default naming conventions and structures are a bit odd for 2012. Hopefully this will be changed in an upcoming version.
I guess it is mainly the fact that it's not using CamelCase for directories, all lower-case filenames, underscores in methods and class names (_Task).
I am re-building a project in Laravel right now that I started with Slim, using a couple of Symfony components and own code and it's a bit of a turn-off for me that I ended up with quite mixed naming conventions now.
With so many PSR-0 compliant PHP libraries and Composer on the rise, I just think it's the way to go. This doesn't stop me from trying Laravel though and so far this is the only thing that kind of bugs me. But don't get me wrong, basically I really like it so far.
Hey all, glad you find getlaravel.com useful. You could also checkout my blog which has 22+ Laravel tutorials including tips and tricks : http://daylerees.com . There is also an ebook available, linked from the site. Thanks!
I don't totally agree with the author: coming fresh to php 5.3 without prior contact with the elephant isn't going to protect anyone from php's inherent inconsistencies or legacy way-of-doing-things for very long. I am specifically thinking about the different naming conventions for functions (sometimes underscore, sometimes not ). Of course my remark isn't about Laravel itself.
With that said I used to try every "small but efficient" framework when I was a web developper and I would surely have tried this one with enthusiasm.
You should check out http://getlaravel.com/ for some basic examples. I've been using Laravel for a few weeks now and I love it! The simplicity is next to none and it certainly has sped up my dev time.
I'd recommend trying it for a week and see how you get on, I think you'll fall for it too.
It looks pretty nice! How can I be sure this will continue to be maintained far into the future though? At least with Zend / Symfony I know they are not going anywhere for the foreseeable future.
It isn't new, but it's in the buzz. Let's face it, stateless MVC for the web is a local maximum. We can do much better, but not if we stick with this MVC crap.
MVC seems an odd paradigm for the non-realtime web, when you have to instantiate every object on each request, and data update events are the exception, rather than the rule.
For simple cases, I often fall into a (M/C)+(VL/V) pattern: model and controller fused into one layer, view-logic and view into another. If database logic is sufficient complex or used in multiple places, break it out into its own layer, same for view logic. No pattern can or should be a universal panacea for every use case.
All that said, I'm really liking Laravel's approach. It's high time that PHP frameworks started getting wise to closures.
> when you have to instantiate every object on each request,
The thing about this that it lends itself well to HTTP because HTTP is a request-based system.
Once you start breaking down the barriers between requests you get all kinds of horrendous issues with race conditions and memory sharing and pain. Sessions just about get by this because they are per-user and people don't oft do huge amounts of things concurrently.
CakePHP (http://book.cakephp.org/2.0/en/index.html) was initially built on ROR concepts. It follows a brilliant MVC pattern and gets you up and running with 'bake' (think 'rails generate') so if you know RoR and PHP, then you will feel very at home with Cake.
Yes, but their Model layer, in comparison with what ActiveRecord provides you with, is really not that great. One of the main aspects that I really didn't like was that the Model finder methods don't give you object instances back, but instead you get php arrays with the fetched data from the database.
Being a micro framework it's more similar to Sinatra than Rails.
In terms of main differences, it's PHP rather than Ruby which means it's verbose rather than terse and it's less automagical than Sinatra / DataMapper.
If you need to use PHP for a project, then it's a great choice, but if you don't then you're better off with Sinatra (or Express and Node depending on what you're wanting to do).
Not really. Kohana uses static methods to create objects extensively. Laravel looks largely procedural to me with static methods updating static classes.
Written documentation is fine, but a quick video would help. That's not unreasonable for something like this, you could have replied more nicely. Instead of like a terrorist.
I need a reason to evaluate your software. There are hundreds of frameworks. If I start evaluating every single one of them, I will spend the rest of my life doing just that.
I didn't think he was. I think it was stylistic hyperbole; deliberate heavy-handed response, just I pulled out the "webinar" gun to label someone a "suit" :-)
I really like this approach. It's one of the reasons I like Express in node.js. I am by no means a fan of PHP after using it on several projects, but if I were forced at gunpoint I would look into Laravel.
I also like the DB table creation code. ActiveRecord-type model delcarations are fine, but I'm interested in exploring Mongoose-type ORM, since I suspect it is more flexible in the long run.
Hey, Dayle Rees here, (guy who made the getlaravel.com promo site) I also wrote the pastes app, and the reason I chose to use routes is that its a tiny application, and using routes avoided all the unnecessary "class fluff" allowing me to prototype quickly. On a large scale app I would have used controllers, which are also available. :)
In a real world PHP is more alive than most of other web languages. Our salaries are paid by businessmen and they don't give a shit how it works as long as it works.