As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been getting a similar feeling lately. I felt this way several years ago when I had been using Apache, Django and MySQL exclusively. I felt like the web stack that I was using had began to show its age. So, back then, I switched to Nginx, Flask and MongoDB. I'm starting to feel like this stack is showing its age again, because I'm hearing about tons of new cool things that sound easier in newer stacks.
For example, I'm hearing a ton about Backbone.js as well as client-side templates, like Mustache. These seem to be able to make use of URL hash bangs and produce pretty awesome sounding applications.
I've been toying with Node.js, Express.js and Mustache.js for templates (I do not like Jade). This setup feels like something that I can get familiar with, because it reminds me of Jinja, which is what I used with Flask. This still does not include Backbone or client-side templates. But, how do I know what a good scenario to be using those when I see it? Is Backbone and Mustache on the client something I should be investing time into? How do I know when I should use them and when I shouldn't?
If I switch to this newer stack, I think I'd still be generating my HTML on the server just like I am with my current stack. How do I make the switch to client-side templates, and why, I guess?
you probably won't get a clear answer on such a question,
it is more open and not a real code problem, you have a big chance this gets moved over to another spot. but untill then it doesn't hurt to give my answer to it.
nothing wrong with generating html on the server,
even the sites with huge javascript injections like google+ and such, still render much of the markup on the server.
the use of backbone, in my opinion depends on which site / app you wish to make, that alone says it already,
the first big thing i ask myself is, am i making an application? or a website.
while some sites can benefit from backbone's, i believe an application is where backbone shows in all it's glory. When creating a website i would end up using backbone for a bit of structure, but not the full deal models, collections, views and routers.
on the templating engine, you need to choose your engine for 2 reasons:
am i comfortable writing how this engine works (syntax, not too much javascript inbetween my html (loops and such))
can my engine do what i want it to do (in certain occasions you want nested templates, some engines don't do that, ...
the first is less important than the latter, syntax can often be changed, some engines support a config where you setup the syntax either {{}} or <%= %> or something you make up yourself.
Use backbone.js...
when you create a medium to heavy web application,
and only when you have working restful api returning json
Use client side templates...
when you can fill them with data from a json object,
and you want to leverage caching of layout and structural content on client, and only fetch the data from server
This isn't a technical answer like the other answers, but will give you other perspectives to consider.
You should definitely be using Backbone or other client-side framework because speed matters for the user experience. The faster the experience, the more time people will spend on your site. People don't like to wait and people are more engaged when something is fast. There are few things that kill engagement faster than waiting.
Why Backbone?
You are already familiar with MVC, so there's nothing new to learn in that respect. With an MVVC framework like knockout, you'd have to spend time grokking that pattern.
It's one of the most popular client-side frameworks. Lots of people are using it and there are tons of resources out there to help you learn. I've put up a list of companies using it in production here:
http://www.quora.com/Can-we-get-a-poweredby-list-of-sproutcore-javascriptmvc-backbone-js-individually
Because it is the most popular client-side framework relative to others (Sproutcore/Amber.js, Spine, Knockout.js, Cappucino, etc.), there is plenty of documentation.
As far as a templating engine is concerned, I recommend that you don't bother with anything except the John Resig micro templates that are already part of underscore.js (which is the only hard dependency besides either jQuery or Zepto.js). Picking up another templating engine is one more moving part to worry about that really doesn't make that much of a difference. It's also trivial to switch from one templating engine to another. Switching is a half day to a 2-day project for a small to medium-sized project.
I think I can see where you are going with this. Personally I think NodeJS, ExpressJS, MongoDB and MustacheJS are pretty good together.
You can create a webpage as you normally would. Use MustacheJS to place the fields where you want the data to show up in the markup.
Then on the NodeJS side, you can use express to route to the html file, gather the data from mongoDB, use mustacheJS to parse the file and then spit it out to the client.
It's pretty straight forward.
Here is an example of doing just that I wrote not too long ago:
NodeJS, ExpressJS and MustacheJS Template Engine
As far as the data is concerned, I'm using a standard object but that can easily be replaced with a mongoDB data set.
Related
What jinja2 can achieve, the same can be achieved with Angular.js. My question is- are there any advantages of replacing jinja2 with angular.js completely ?
I think most problems came from the same obvious difference: Jinja2 is server-side, Angular is client-side, this makes they really different.
SEO. Google don't understand Angular magics. It is just a heavy Javascript code and Google can't understand it fine. Sure, you have some workarounds to show your important text to Google, but to solve it you'll have to render some things server-side, going back to Jinja2 or some hack to render things to improve your SEO. (it is not important if you don't care about Google searches)
Performance Server-side rendering is way faster than Javascript rendering. I'm talking about your average user, maybe with an outdated Internet Explorer and a crappy internet connection. With Angular, you have to wait at least some Javascript assets to be loaded before the page is usable. Users notice this and we know a slow site will hit your conversions. Check this Twitter article about "time for first tweet": https://blog.twitter.com/2012/improving-performance-on-twittercom
Compatibility. Yes, they claim the framework supports all common browsers, but have full documentation about hacks to make it work for IE7. Depends of your audience.
Maturity. Jinja2 is really stable, has a pretty API and is deployed with almost all Flask websites. Angular is still evolving and sometimes things just change a lot.
Inexperience. You can't just replace Angular with Jinja2. When you try it, you will understand they are different and you must not work the same way with both. You will make a lot of mistakes before you make things right, just like with any new awesome tool you use.
Of course you can claim against all my arguments based on your specific needs, this is just some things you must understand before you go to Angular.
That said, I'm using Angular in several projects, mostly for single page apps. This is an awesome use case for Angular. In all these projects, I still use Jinja2 to some rendering, so this is not a complete replacement.
UPDATE:
Some updates almost two years after my initial response.
Google is better understanding dynamic rendering, but I still don't trust it.
I don't think the client-side rendering is a thing. Only realtime data is rendered client side, but the base HTML is generated server side.
Angular dropped IE7/IE8 support. It is definitelly a good thing for the web, but unfortunately I still must support these browsers in some cases.
Angular 2 is on the way, changing everything you know about current versions. I don't remember any major Jinja2 change.
Why is replacement your objective? Use the power of both Jinja and other server side frameworks together with the power of client side frameworks.
The benefits of using both:
less and easy code
better performance
more easy to maintain
and much more. You have a choice.
Choosing for one or the other will make your work frustrating and complex.
I'm wondering if anyone has found a solution to this problem. Is there a way to get the best of both worlds:
build a page-based site, with permanent links, accessibility, SEO, and graceful fallback / progressive enhancement (basically all the best practices of web development)
and, for those with javascript, a responsive front-end experience with ajax loading of content, no page refreshes while navigating the underlying site pages, minimal redundant downloading of scripts/content/css/etc. (all the benefits of a client-side framework like AngularJs or Ember.js)
I see a few major sites are able to manage this (gmail, stackoverflow), and I see that Jeff's new site builds a bare-bones version of the site in a noscript tag.
Is the solution to the hybrid page-based/single-page app to build two versions of the site, send both, and let the client decide which it can show? (is this what gmail does?)
Or is the problem that AngularJS et al. are simply not designed to allow for graceful degradation?
It hurts my DRY brains to think that #1 is the answer.
(The reason I am focusing on AngularJs is that I like its support for html templating, declarative style, and its attempts to fix js scoping. Ember and other frameworks are excellent too; maybe one of them would be a better fit for a hybrid site?)
This questions is a bit of a nuanced one because the answer is "it depends". For example you mentioned Gmail, there isn't any reasons whatsoever that an application like Gmail would need to be indexed for SEO, though depending on what you want or need to support you may want to ensure you can support not having Javascript.
However even the "no-javascript" argument is getting tired and weak these days, at least for the class of "web applications". If I want to use a Windows application I need Windows, if I want to use a javascript powered web application it isn't unreasonable to assume that I'm going to need a browser that isn't crippled to use it.
However back to your question I can only speak to AngularJS because I'm the most familiar with it. For the most part it does allow you to support a progressive enhancement approach, though don't expect to use things like URL routing if this is what you want to support. What you can do is use AngularJS controllers, bindings and directives similar to how you might use jQuery as a way of enhancing the interactions and behaviours of the page.
Just keep in mind this approach will seriously limit what you can do with Angular (or Ember for that matter) and it may start to be debatable what you are getting from this approach that you couldn't easily do with jQuery alone.
The alternative these days is to do what sites like Twitter are doing. That is basically serve fully rendered HTML from the server for any view on the initial load and then use Javascript for subsequent loading and enhanced UI behaviour. This is very effective (though perhaps quite challenging to implement) if you really need to support browsing with and without Javascript and has the added benefit of improve the rendering/load times for the first request. Again "it depends" because it depends a lot on how your site actually works if it is possible to use this. You have to design for it, and it isn't going to be trivial or easy.
Update:
For what it's worth we are taking the Year of Moo approach and rendering the pages that need SEO using PhantomJS and sticking the cached initial state of them somewhere to serve them up. We have a rake task we run on deployments to update this. Again this is just the initial state but it helps get around the issue for now.
Things are always changing though and I'm sure I will have changed my mind on this approach in a year or so.
Have you read Google's Making AJAX Applications Crawlable. You can have JavaScript single page app and crawlable content.
If you stick with angular, there is interesting article: Turns out it is possible to have your AngularJS application indexed
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
After years /decades of using tasks managers: Lotus Notes, Outlook, Palm (that was a good one), etc.. and now using Appigo, after using Toodledo, a friend of mine and me (both programmers) got tired of how far are all those from our personal GTD style and we decided to build one, something that we can customize as much as we can moving forward. We will do it open source open to public.
Appigo and Toodledo a great inspirations from a functional and technological point of view. We like the server on the cloud, the clients on browser and mobile platforms.
We have been thinking this for a while but when we saw Grails and did some of the tutorials, coincidentally on the task manager subject, we said ‘great, we can use this technology to build ours, this sounds cool’. (at least for the web part and the model, the core part).
Following Appigo strategy also, we plan to use Google App Engine for hosting the back-end.
On the mobile side, since we do not have time for hard core objective-c and stuff and we have a decent experience on Javascript frameworks we decided to use the now popular HTML5/Javascript approach and we think we decided for Sencha but any other Framework may be fine (Dojo, jQuery, etc).
Not surprisingly, our mobile and web clients will communicate with the server primarily using REST and we plan to have a server-side MVC (Grails) and a client-side MVC (like Sencha or Dojo propose)
We do not want to bother too much about databases, we love the Grails idea of creating a model-driven objects and storage.
Our project will be open source and hosted on github for anybody to use it.
Ok, here is the actual question:
Do you guys know good books or sample apps or articles that can help us go through this end-to-end. Of course we could go alone, but we will greatly enjoy going through some books, tutorials first to glue of these things together, decide good patterns to use, learn tips, experiences..etc. We do not have experience with Grails. (but a lot of java and javascript web development), of course I can find books about Grails but we want something end to end, with a good sample focusing on practices and patterns.
Basically a book or article that somehow touches part of this topic “good practices and experience building something like a task manager that runs on Google cloud platform, has the server side done with Grails and the browser and mobile clients using robust HTML5 javascript frameworks”.
Can anybody point us into this?
Thanks!
I have done a couple of engines that are build using grails + the google app engine. My experience is that you are going to have to build up the knowledge thought actually doing the work.
It's very easy to start out but once you get about knee deep there are some very interesting problems that can crop up.
Now that being said the main resources that I have found useful are the following:
http://shop.oreilly.com/product/9780596522735.do
http://www.amazon.com/Groovy-Action-Dierk-Koenig/dp/1932394842
http://www.manning.com/gsmith/
https://developers.google.com/appengine/docs/java/overview
The link above gives a good java over view. But you will need to be able to distill that down to groovy.
http://www.grails.org/plugin/app-engine
and finally www.google.com
but i found that most of the blogs out there are dated to earlier version of grails. And a lot of the issues they were seeing have been fix in 2.0 or are no longer issues at all.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I apologize in advance for the open-ended question. I tried searching, but wasn't sure what specifically to search for, in all honesty...
Briefly put, I'm a novice iPhone programmer and I've made applications that have communicated with a Java server. For example, my iphone application would use HTTP Get or POST requests and would receive back data. However, I'm not the person writing the server side code and frankly, have no idea how it's done!
I'd like to learn at least the mechanics of how things are done on both sides, so now I'm trying to learn. I picked up a book on Google App Engine since it seems like an economical way just in case I do decide to release a server/client app.
However, I assume that I could have chosen RoR or PHP as well. I'm assuming the principles must be the same.
If anyone could point me towards tutorials that shows the "other side" of what happens in a server/client app, that would be most appreciated! By other side, I mean, on the client side, I already know how to request and receive data. I just dont know what happens on the server side...
Thank you and sorry for the general question..
These are most important components of web application:
an http server: serves static files, works as a pipe to your applplication for dynamic content. For example: apache, nginx.
An actual web application: handles requests for dynamic content. Usually you use a a web-framework. For example: django for python, symfony for php, RoR for Ruby, node.js for javascript.
A database server. For example: MySQL, PostgreSQL
Some other things which might be considered:
a mail server to send email messages
image processing libraries
fulltext search engines
These components are less common:
memory caching server, for example: memcache
non relational databases, for example: redis, couchdb, riak, mongodb
task queue server: for example RabbitMQ
The reason why appengine might seem easier for novice is that you don't need to configure web server or database. You only need to write your application code. Fully-managed hosting with task queue, memcache, datastore, content-delivery-network are already available in appengine.
The problem with appengine is that it forces many limitations on you.
If you don't need memcache, task queue and distributed system then it is very easy to develop applications with popular frameworks, they provide tutorials how to set up your own http server and database.
If you need these advanced parts then it will be more difficult to configure everything.
Common practices in web application development include:
using ORM to work with relational database
using MVC or similar pattern to structure code
Html code is kept away from code in templates. Thus templating language is used.
As a web-backend developer aside from coding application code you also need to understand well the database which you use.
If you only build a backend for your mobile application, you won't need HTML, CSS, Javascript and templating. Though MVC pattern and ORM still applies. You also will need to know more about HTTP protocol and various methods of implementing an HTTP API. If you like XML, the WSDL does a good job. There are great libraries for WSDL which makes writing HTTP API easy.
The base API in Java is the Servlet API. Read this tutorial.
On top of this API, there exist a myriad of frameworks (Stripes, Spring MVC, Struts2, JSF, Wicket, etc.), which all have their own philosophy. There are two groups of frameworks, though: action-based ones (Stripes, Spring MVC, Struts2, ...) and component-based ones (JSP, Wicket, ...).
The action-based ones usually use JSPs for their view technology (to generate the markup), but also support others. What you'll learn if you learn JSP will be useful in a variety of frameworks, so I would learn it as well. Read this tutorial.
I applaud your choice of starting with App Engine:
Some concepts of GAE are hard, but so is SQL. If you don't know either you might just start with GAE which is a modern noSql system.
GAE is not a good fit for all problems. But I believe it is a good fit for your setup: a lot of independent clients with limited need for heavy queries.
About the cost: GAE is cheap if you know how to programm it. I have both EC2 and GAE in different setups, and while they are hard to compare, I believe GAE is cheaper.
IMHO most of the cost of hosting comes from support/management cost. We have a team 10+ developers, but no system/database admin.
I think, starting from app engine may not be good idea for starter for server side developing.
Asp.net ( or php) will be more "efficient": not only source for learning and tutorials but also better for make mistakes and learn better
Once you done with asp.net, and have good pratice about your server side project,
it is easy and very fast move to app engine
good luck
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What is conceptually the difference between symfony and cakephp?
Just to balance out this thread, this is why I like symfony:
uses PHP5
it runs some really big sites like Yahoo! Answers, delicious, and Daily Motion.
good documentation. the jobeet tutorial on the website is awesome. walks you straight through all of the features, and after you are done you feel like you can build anything.
is highly modular; many of the symfony components work on their own.
allows you to choose either Propel or Doctrine as your ORM. Doctrine is really great and easy to use.
you can define your models with YAML or in PHP, its up to you. Some people don't like configuration files, and you can really limit their use if you want to steer clear of YAML.
the updated symfony cli (as of 1.2) is awesome. I agree with abales, before this version it was a little wonky, but now it is very well documented and follows a predictable format.
there are a lot, and i mean a lot, of similarities with ruby on rails, except that of course PHP isn't quite as pretty or flexible as Ruby(!). But, if you talk to a cake developer, they will probably say the opposite :)
the symfony admin generator, which is a step up from CRUD (which also exists in symfony), is a huge time saver. Using your data model it will generate customizable admin interfaces complete with list views (index), create, and edit pages. It's not like basic crud where it generates the source and you go in and modify it... You actually can define how each field looks, which fields you want to include, what additional actions you can perform on each object, and so on.
Conceptually, I'd say the difference is this:
CakePHP has a smaller learning curve. If you have never used a MVC framework, Cake will be easier to pick up and run with in a short amount of time.
Symfony feels bit "bigger," not to say that it is slow, but that there is a lot of code back there that will let you do a lot of really advanced things when you need to.
The best advice I can give is to quickly try to set up a your own simple data model in both, and experiment with some basic interfaces, and just see which fits your own coding style the best. I think both frameworks have very active and passionate user communities and you won't regret your decision either way.
CakePHP philosophy is similar to Ruby on Rails.
CakePHP is better for medium projects.
CakePHP is faster to learn.
CakePHP is lighter than symfony.
CakePHP's Database Interaction uses CRUD.
CakePHP uses the test system PHPUnit.
Is interesting in CakePHP Bake and scaffolding.
Symfony's philosophy is each version is different.
Symfony's is slower to learn.
Symfony's is best for large projects.
Symfony's Database Interaction uses Doctrine.
Symfony's uses the test system PHPUnit.
Is interesting in Symfony's Bundles and templates.
A big difference is in how models are created: CakePHP models are written in PHP, and Symfony models are written in YAML and powered by Propel. CakePHP's approach is more similar to ROR's ActiveRecord (although it isn't exactly an AR implementation). CakePHP, in general, is more rails-esque.
CakePHP's documentation and tools, in my opinion, have a wider target audience and the syntax and helpers are easier, but thy have yet to embrace PHP5 as their exclusive target (to autoloading isn't really there). In general, I prefer CakePHP's approach because it sort of follows an established standard, and I applaude it's organization. I'd also recommend Kohana for it's PHP5 goodness.
There's another post on stack overflow about this question, although its a bit different in focus.
Edit: I revisted Symfony to find the reasons I said 'no' and came up with these — your opinions and mileage may vary:
CakePHP also offers dead simple scaffolding and easy to understand CLI tools. Symfony's CLI syntax is a bit wonky to me, and 'CRUD' in Symfony just isn't the same. Combine that with Symfony's (awkard) action syntax and throw in Symfony's poorly designed (and challenging to understand) website, and preference for 3rd-party paid documentation (books on Amazon) and you have more ticks in the cons column.
Some of the claims about CakePHP and limitations above simply isn't true. The query is possible. You just have to know how to make it. The "automagic" of CakePHP is SUPER nice so you can hit the ground running FAST. It is BY FAR the FASTEST framework to development (hence why it's so closely modelled after RoR which obviously was a big success and buzz). There are more advanced behaviors to get data returned differently and make some of those more complex queries with a few short method calls and array parameters specified.
However. As far as I can tell, no other framework has as many "automagic" methods and classes. Cake takes the most common of tasks and provides an easy way to get it done. If you're really clever, you'll do most of your coding at the model level and make use of the app_model and app_controller file and have an extremely efficient application.
The console is great and always expanding. The community is truly amazing and there are many many contributions to help you get things rolling even faster. You can literally architect and then move "pieces" into place to build an app very quickly because most of what you'll need is available. You do not get that with any other framework. You have to spend a LOT more time coding usually.
Lastly. While the documentation was lagging, it is much better now and while Cake also got some harsh reviews during this lack of documentation and version 1.1 period...It was STILL good, just severely overlooked. With 1.2 and now Cake2 and Cake3 on the horizon...You're going to see a lot of opinions changing.
I have used CakePHP since 1.1. I'm a firm believer in it. I have used it for huge corporate sites. That receive millions and millions of hits per day...We're out of the realm of things like WordPress and Drupal for solutions. When you get to that level for a CMS type site, I am super glad to have CakePHP on it. Likewise, Symfony and CodeIgniter will help you with the scaling. I can't say anything bad about either of those frameworks either. I can only say that you will spend less time coding and find a larger community (and a super friendly IRC channel) with CakePHP.
I'm going through and documenting some of my responses to the above comments about CakePHP and some of it's (in some cases rightly) perceived faults.
Big websites are run using CakePHP, some being Mozilla Addons, Scratch by MIT, and Hot Scripts. There is a bigger list right at the bottom of the CakePHP website (http://cakephp.org). Regardless, any good developer should be able to build a scalable website using a framework as long as the framework isn't completely silly (CakePHP isn't too silly :D ).
It is true that there isn't one very good (free) CakePHP tutorial that goes through every feature of the framework, but the documentation is extremely well laid out and verbose. Anything that isn't clear can be cleared up through the Google Group and on IRC, and we welcome any and all changes/corrections to the documentation. Documentation is not just a core developer issue, as many things are application specific and people come up with interesting tips and tricks, and so thusly everyone is invited to contribute (Not just comment!). Of course it is all moderated, so most of the cruft/spam is not added.
The code is modular in that you can add in new code that supercedes core functionality. Much of the code is simply PHP classes. It is true that writing such functionality may be a burden, and I have not tried using alternate classes as fillins. Yes, it does not handle other ORMs, so you are stuck with the default, but this should be fixed in Cake3, which will be able to mix and match any other PHP classes at will (that includes Propel and Doctrine support).
The CLI is very good, and it is easy to extend for App-specific support. One example is that I recently developed a shell plugin that would automatically install any other CakePHP plugin that I have indexed from github. Took about 5 hours to build something extremely usable and flexible. I'm sure such functionality exists for Symfony, and it DOES exist for RoR :)
As for being Rails-like, it is and it isn't. Many things are similar, they are MVC frameworks after all, and CakePHP goes for the "Conventions vs Configuration" approach. PHP4 support mucks with a nicer syntax, which Symfony doubtless has because of PHP5-only support, but it is still extremely usable and intuitive. The framework does not provide EVERY feature of Rails out of the box as it isn't a straight clone. CakePHP is a framework, not a library (hi Zend), so it won't provide everything out of the box.
Generation of views is, I agree, a bit wonky in CakePHP. It is being greatly enhanced in CakePHP 1.3 and 2.0. It will support custom templates for each and every Model, View and Controller (as opposed to just a type of view as it does now). Also, there exists a set of shell tasks on github by a user going by neilcrookes that auto-bakes only certain types of views (including only admin views) which can be used in combination with custom templates to produce exactly what you want. CSS styling also helps :) but this is definitely something that can be improved.
CakePHP takes many varied parameters in it's Model::find methods, although in certain cases it may be useful to use raw SQL queries. The Model::find() method is very flexible and has not failed me insofar as creating complex finds. I suppose that is related to being comfortable with the ORM, which inevitably always takes time.
Form validation should logically be in the model layer, as that is where any action related to the database is being performed. You can specify alternate validation in a specific view I believe, or swap validations (there is a behavior for this but it wouldn't be hard to do so without it).
Multidimensional arrays are a bit silly, but you'd still likely have multidimensional objects. PHP4 had a broken Object Model and so that is why CakePHP does not use objects. This is being corrected in a future version of CakePHP (as I pointed out above in a previous comment), but it is useful to have a framework that supports PHP4 in some cases. Again, YMMV and I agree that full PHP5 will be a great boon, both in speed of the application and of development.
Databases can be swapped out at will. CakePHP does not allow functionality that is inherent in only one type of DB (hence the dropped support of ENUMs that are only in MySQL), so that the ORM is always supported and can always build valid queries. You can have multiple databases in an application, one per each Model if you wanted, and can swap them at will or even not use a database at all for a specific model. So no, it is not tied to a specific database.
In the end, your choice is your own, and I wholeheartedly suggest looking into both and reading through the documentation, checking out the Groups, IRC channels, blogs and any forums for both and seeing which framework suits your development style the best. Reader beware, I'm a CakePHP developer so my post has some bias.
Further to the existing answers, you should try both if possible. I use both quite a bit, and over some time, have come to prefer symfony.
but I'm fairly convinced that its not because one or other is better, but because symfony happens to suit the way my mind works better, its closer to what I do when I write software outside a framework, so feels more intuitive. I expect that others may find their mind fits the paradigm of another framework.
Having said that, I do think that cakephp's objects are a weakness, through the use of arrays rather than objects. (This is something that periodically develops into an intense hatred inside me whenever I need to do something that it makes hard ... ! ) They could do exactly the same, but return objects rather than arrays to represent data, and I think most of the issues I have would go away - you'd be able to add extra functionality into the data objects to achieve the things I want to do, rather than writing functions in the existing model class and passing them an array.
The model layer of CakePHP is a mess. Try doing simple things like a many-to-many relationship between a Category and an Item object and then retrieve all the Items in a Category that have a specific property set.
Like:
SELECT items.* FROM items, categories, item_categories WHERE item.available=1 AND category.id=1 AND item_categories.category_id = category.id
Something so trivial is not possible in one statement in cake with the find() method of a model.
There is also no way in the core API to add a single many-to-many relationship as in one item to the item_category table above. There are a couple solutions online including a behavior that someone posted in the bakery (http://bakery.cakephp.org/articles/view/add-delete-habtm-behavior), but that's just stuff that any good ORM framework like Propel, Torque(Java), Hibernate(Java), SQLObject(Python), SQLAlchemy(Python) support right out of the box. Basically you're either going to have to write a lot of PHP code to add those missing features or use raw SQL queries but the main purpose of a framework is to avoid doing those things so that you can focus on the application that you're writing so you're not really gaining much with CakePHP.
There are a bunch of other problems and they all really have to do with the model layer including the form validation being tied into the model layer, having to deal with messy multidimensional arrays, having to use raw sql and tying your app to a specific database.
I would say use symfony. It's a bigger framework might take a few days longer to learn but it will be well worth it. I was going to use CakePHP for a project that I am working on, after running to too many of those types of issues I switched to symfony and it's been smooth sailing.
One difference more is: Symfony separated to 3 environments: Development, Production and Testing - CakePHP can not!
It's easy to develop and test product at same time
Cake 2.0 nicely autoloads most of the classes you need, whereas I found in Symfony 2 that every class had to have numerous imports at the top of the script. Attempting to memorize all those imports is near-impossible, so you always need a reference handy.
eg. Symfony 2 controller code...
namespace Acme\HelloBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
// bunch of other imports accumulate here...
class HelloController {
...
Argh, yuck. While that may be good OO technique for the purists, it lengthens development time (bye bye RAD). At least with Cake I can code most of the simple stuff quickly from memory now.