I know that Pylons is discontinued as such and is imported to Pyramid. However, I really like to learn Pylons and could not make my way through Pyramid (which is still rather premature and lacks begginer-friendly docs) so I started to read the online Pylons book, which I think only covers Pylons 0.97 and some of examples (like the one about 'environ') did need work for me (in Pylons 1.0) So I seem to have some bumpers in my learning curve that led me to wonder whether it really worth the effort.
Pylons is a very mature framework and you can develop sophisticated web applications with it. Although the docs are outdated you can still learn from them with a few tweaks and looking into the updated cookbook. The difference between Pylons and Pyramid are the merge of repoze.bfg and turbogears which brings more API resources. If you come from a Pylons background and want to learn Pyramid you should take a look at Akhet.
Related
I am planning to start a new complex project with ruby on rails, and I am currently thinking of which frontend-framework to use. I have never used one before.
Reading the docs, batman.js becomes really interesting. I would love to do things like "#post.comments" on the client side to get all comments for a given post - with nearly zero configuration. I am afraid of duplicated code if using a mvc-framework in the frontend and guess batman.js will reduce it. But in comparison to angular, batman does not gain from much support in the community (see Google Trends for example).
So my question is, is it possible to have the benefits of a batman.js-app in an angular-application with a little configuration? Do you have any good links for a good rails-integration?
I guess this is relevant to the batman.js side. We have a couple Rails + batman.js apps in production already and we'll be launching another one soon. Here are the advantages and disadvantages we've found:
Advantages:
Ruby & Rails-inspired syntax & architecture (eg, model associations, naming conventions, routing)
Easily integrates with Rails (batman-rails gem, JSON REST communication, CoffeeScript, Slim templates)
Easy to implement real-time updates (we're using Pusher)
Disadvantages:
Low "googleability". Not as widely used as Ember, Angular, Backbone etc.
Underdocumented. All our developers dive into the source from time to time.
For my part, I'm enjoying batman.js a lot and I'm trying to make up for the shortcomings by adding to documentation and being active on IRC, github and the google group. Good luck in your decision!
Have spent a week trying to wrap my head around Yii framework, but while I do get a sense of it's elegance, I am finding the learning curve rather steep, compared to the 2 days I spent on Codeigniter. My background is of Unix systems programming (communication stacks), with no MVC exposure, and know only basic PHP (find it fairly simple & straight-forward).
I've considered the no-framework approach, but find it even more daunting given that, I've almost no web-development experience. A framework, at minimum would give guidance in terms of architecture & design.
I might be shooting myself in the foot, but with a tight deadline on ramp-up, and delivering a somewhat complex web-application, I need to get productive real fast.
So wondering if community can guide me, if Codeigniter 2.x, would be good choice for me, given the following requirements --
Easy to learn and able to deliver quickly, something that is functional. Thus needs to have extensive, easy-to-use documents, tutorials (beyond simple-blogs) and a very active community.
Framework needs to make it easy to integrate features like -
User registration with captcha
User verification using random verification key sent via mobile phone
Send Email, short-message to mobile phone
Integrate with Payment Gateway
Have significant no. (close to a hundred) possible CRUD operations
Doesn't get in the way (if not making it easy) to work with AJAX, for things like timeline presentation - including audio-snippets, photographs, video-snippets
Doesn't get in the way (if not making it easy) for the web application to be made accessible on mobile devices s.a. smartphones
Has reasonable performance. Need not be the fastest, but performance is a concern, although secondary.
Of course, I do not need all the features on day-1, and willing to invest some time in reading/learning about the framework, but wouldn't want to read an entire manual first.
Note that I've already searched the Codeigniter forums and found discussion on some of the required functionalities, however most of the interesting libraries seem to be available only on Codeigniter 1.7 and found little confirmation of those being available also for Codeigniter 2.1 ! Also, all Codeigniter books are for 1.7, and none for 2.1. Does that mean that 2.x doesn't have enough adoption and community support ?
Yes. CodeIgniter 2 is a good choice.
It is pretty easy to use and learn. I'd suggest understanding the MVC architecture in general though. They're official documentation is awesome, although sometimes I yearn for the straight-forward API format. You'll notice that they don't show all the available parameters a function will accept up-front; sometimes you have to read the entire page to figure it out al your available options. Note: You'll find that there is no one way or standard in using models in CI. They're as helpful as you manually code them to be.
There are tons of libraries and helpers to do pretty much anything you need, as well as tutorials on how to do them. Not sure what you meant by verification key sent via mobile phone. AJAX is not a problem. CI has this pretty handy is_ajax_request() function that's really useful. Note: there used to be a problem with AJAX request expiring sessions. Not sure if that's still an issue. As far as making it accessible for mobile-devices, you'll find more issues on the front-end than the back.
Baseline (virgin CI) performance is pretty good. It's up to you (your code and queries) to keep it lean.
Many of the libraries you find may say that they were made for 1.7, but may work with 2.x You can try updating them yourself if necessary. We'd be glad to help. Note that "plugins" have been deprecated in CI 2, you'll have to convert plugins to helpers or libraries (depending on your needs). CI 1.7 has a 3-year lead on CI 2. It'll take some time for "the community" to catch up.
Hope this helps.
I am about to start a new project and I am hung up on which language/framework to use. I've been a PHP programmer professionally, but it wasn't on the scale of this project. I've played around with RoR and i've been very impressed so far. Right now, the two leading candidtates are RoR and Symfony2.
My major hang ups with RoR:
- i don't know ruby, or i hardly do. i can read it ok, but get stuck writing the code.
- i've read complaints about it being slow, and it seems to be slow just at the CLI.
My major hang ups with Symfony2:
- there's practically no documentation for it. Symfony1.x? sure..but not symfony2
- there's also little support. the BB on their site is like 80% spam.
- went to install it on a local dev enviroment haven't been able to even get that running (see my first hang up)
this project will be fairly complex and go beyond the basic CRUD operations. it isn't under a super-tight timeline, but there is one. ~3 months for milestone1 which is basically a calendar, some financial organization stuff (not transactions with financial institutions, just personal finance organization type stuff), and a project manager/cms.
also, i'm open to using other frameworks, but symfony2 seems to be the best right now. if symfony2 had RoR's support/documentation/tutorials/etc it would be a no brainer.
i'm really interested in hearing what the stackoverflowverse has to say on the matter. im constantly impressed with the quality of the answers/replies on this site.
some other sub-questions (that are in my head right now):
- if you recommend a different php framework, why?
- what are you biggest gripes with any of the options mentioned?
i know CakePHP is the closest to RoR, but i've been reading that the models are a bit wonky (Many to many relationships and such).
right now, i'm leaning towards RoR. Simply put, i really want to learn it and it could do the job. i just don't know ruby and i've ready a lot of good about symfony2.
any advice you could offer will be greatly appreciated. thanks!
Personally, I'd recommend that if you're starting a new project which happens to be the largest project you've ever had to do then you should stick with what you know best. This happens to be PHP.
I've used Ruby or Rails. In fact, we have some production apps at our company that use RoR. The best way I learnt RoR was to work on small projects. I would never have considered to choose a programming language which I'm not familiar with and then on top of that learn a new framework to start coding a big project.
As for Symfony2, we started using it a couple of weeks ago. Symfony2 is an excellent framework and looks very promising. It's clean, nicely decoupled and fast. However, we ran into too many bugs/headaches/inconsistencies in Symfony2 to continue using it. We will start working on it again once it has matured and the documentation grows (lots of the docs are now out of date). Hopefully, they'll release some sort of Jobeet tutorial but for Symfony2.
Moving on to CakePHP. CakePHPs code base is old. In fact, it works fine on PHP 4.3.2. It doesn't take advantage of all the goodness that PHP5 has to offer (absract classes, interfaces, private & protected properties, exceptions, magic methods, annotations, pass objects by reference etc.) CakePHPs database abstraction layer, whilst it has had improvements, is not incredibly efficient once your database structures becomes too complex (many joins for example) it crumbles quite badly.
Moving on to Symfony 1.4 which I've used for many large projects
I enjoy using because:
PHP5
Event system
Dependency Injection
Caching system
Forms (nice integration into Doctrine 2) In fact, this is my favourite feature.
Many plugins (sfGuard for user management, for example)
Twig (nice templating language)
Highly configurable
Scalable (although not as fast as Symfony2)
A lot of documentation (Jobeet tutorial is great)
If PHP is for the moment your forte and you need to start working on a large project then start using a PHP based framework as you know the language syntax and functions the best.
Move onto RoR when you have a small project to do.
Just my 2 cents.
Best of luck.
To me Symfony2 has been great so far. Documentation is scarce compared to Symfony1.x but it's much easier to get started in Sf2 and, with things being very explicit, requires less knowledge of how the framework works internally.
There's an app/check.php script that will warn you of any dependency needed to run it, and support mostly happens in their mailing list which is very active (didn't even know there was a BB). Some components, like Twig, also have their own lists.
This is an old topic but things have changed a bit and I would recommend Symfony2. Their current documentation is great (symfony.com) and its much easier to learn for newbies. I did try RoR but with symfony I just got into it much quicker.
I'm amazed of how no one has mentioned the super rich GEM community for Ruby and therefore for Ruby on Rails, there is simply just so much functionality out there, so many people working on some many MIT/open source projects. To me, community is what drives me to go choose one framework over another. The amount of configurations and different template engines, there is just so much out there for ruby on rails.
For a comparison chart check this out:
http://vschart.com/compare/doctrine-php/vs/ruby-on-rails
At the end of the day it all boils down to whatever you know, but do not overlook the community and the functionality that has been written for you already, free of charge...
I'll echo solarc's comments about Symfony 2. I used it for a couple small projects, and am starting something more ambitious with it this week. I would like to see a complete Jobeet-style tutorial, but the main documentation is good enough to get started with IMHO. I'm giving that a thorough read, and have learned a few things that I missed using the documentation as a simple reference.
Finding bundles was my biggest frustration, but the documentation mentions knpbundles.com, and that seems like an excellent resource.
I'm going to develop a collaborative site, and one of the features will be collaborative editing with realtime changes. i.e. when two or more users are editing the same doc, they can see each other changes as soon as they happen.
I have some experience with Ruby on Rails, so I was thinking about using EventMachine, but with all this hype around Node.js, I am know considering using it instead. So, what would be the main benefits of using Node.js instead of EventMachine?
tl;dr
What are the main differences between EventMachine and Node.js (besides the language)?
EventMachine has nothing to do with Rails apart from them both being written in the same language. You can get EventMachine as bare as Node.js; all you have to do is not add libraries to your project. In my experience the EventMachine libraries (like em-http) are much nicer than anything for Node. And you can use fibers instead of callbacks to avoid callback hell. Complete exception handling is pretty much impossible in Node because of all the callbacks. Plus Ruby is a nicer, more complete language than Javascript.
I tend towards the "use what you know" (even if it's a heavier architecture). Because of that, I don't see it being quite as simple as "EventMachine vs NodeJS." Mainly, the difference can be summarized as this:
NodeJS is a framework/language that was written to handle event based programming in JavaScript. That is its driving force. It's not an after thought, or a third party mechanism. It's baked right in to the language. You create callbacks/events because that's how the language is built. It's not a third party plug in, and doesn't alter your workflow.
EventMachine is a gem in Ruby that gives developers access to some of the goodness of the event based programming model. It's heavily used and well tested, but not baked directly in to the language. Both are locked to one CPU, but with event programming at Nodes core, it still has a leg up. Ruby wasn't written with concurrency in mind.
That said, technical problems can be overcome. The more important questions (from my view) that should guide your decision are these:
What will your production environment look like? Do you have complete control over the server? Can you host it however you want? Or will it be on a shared system to start with, and then you have to expand on that?
Do all the developers on your team have the ability to learn a new language very fast? How fast will they be able to understand an event-based language like JavaScript for the middle tier?
Do you need all of the architecture that Rails gives you (full Testing framework, scaffolding, models, controllers, etc)? Or is that overkill?
There are quite a few technical differences between the two. One is a language, one is a framework. Really, how heavy of a stack you want to run? How much learning will your developers have to do? Do you want a full stack the gives you a lot of niceties, that you may not use, or do you want a bare bones set up that runs extremely fast and concurrent, even though you may have to write extra boiler plate code and learn a new lanugage?
While Rails is not as heavy as some web application architectures, you're still going to need more processor power than you would to handle a similar amount of throughput in NodeJS. Assuming quality code for both systems. Bad code written on either stack is going to prevent the stack from shining. It really comes down to- Do you really want to learn a whole new way of doing things, or utilize your current understanding of Ruby to get things off the ground fast?
I know it's not really a definitive answer, but I hope this helps guide you to a decision!
One thing worth mentioning is the production story. EM, like most Rack stuff, has plenty of testing and monitoring tools available that are well tested, whereas Node.js falls well short in this respect.
At the time of writing, it seems almost impossible to get clear metrics from Node to answer questions like 'Do I need to scale'. There are options starting to form out there from the likes of Joyent, and always the roll-your-own argument, but nothing anywhere near tools such as NewRelic.
Node.js is very good from a performance / configurability point of view, but personally I wouldn't host it in production just yet.
Node.js
You get far better control low level control over what's going in. You can include general libraries to build on top of node.js to tweak your level of abstraction to your own liking. For example you can use connect or express depending on whether you want a view engine written for you.
You can use socket.io or now depending on how much you want your client-server connection abstracted. You can opt to include any of numerous MVC libraries or write your own.
Event-Machine
An asynchronous IO library just like node.js
It comes down to a Ruby vs JavaScript preference, how much flexibility you want with abstractions or lack of abstractions and whether you want to use node as your actual web server.
a detailed view at confusion has already been proposed... just a personal view
[] node.js will be better, if you are ready to learn and experiment more than you think because:
it's thread mechanism is awesome (inspired from that of 'erlang')
you can build a purpose specific server (easily) which will be real productive
Django as a framework is a neat little package. There are very few files (compared to Rails) and it's got a clean structure. The fact that you can plug and unplug apps between different projects is an extremely nifty feature. At the same time, Ruby's hacking ability is unparalleled. It's complete object-orientedness makes it more expressive and fun.
To cut the story short, is there a Django-like or Django inspired framework on Ruby?
If not, would be possible for an implementation of Django on Ruby? What would be the challenges?
If one were to create a Django-inspired framework for Ruby, how would it's Domain Specific Language (DSL) nature come into play?
I've spent a good chunk of my past life using Symfony, which is a PHP framework heavily inspired from Rails. When I saw Django, it came as a bout of fresh air. I'm really curious to know what you guys think and have to say on this.
Update: I stumbled on a framework call Ramaze for Ruby. It seems to be a bare-bones MVC framework with pluggable components for the JS framework, ORM layer and the templating engine. So you could use Prototype / Sequel / Sass, or Mootools / ActiveRecord / XSLT, or any other combination of your choice! As a side-note, Merb is an interesting choice too.
Update 2: I'm sticking to PHP for big-ass commercial projects and Django for my personal projects. Reason why I decided to side with Django was the amount of flexibility it offered. That said, I realized that with greater power comes greater responsibility.
My advice to others: if you know exactly what you want - go with Django. It's probably easier to define things explicitly in it than in Rails. Merb may have been a good choice too, but I didn't have the time to explore it. Django seemed like a good fit and so I stopped being anal about the language I'm using. Thanks for all the help guys!
Try merb, merb-slices, and datamapper is probably the closest you can get in ruby.
I think you need to define a little closer what you mean by "Django-like". Depending on your exact definition, any of these might fit the bill:
Ruby on Rails
Mack
Waves
Merb
Iowa
Is having less files really a deciding factor on choosing a framework?
I agree that keeping track of a smaller number of files is easier on the brain, but I would choose a framework on:
documentation
size of community
maturity
before I woried about file count.