5 ms·
I'm not a fan of frameworks, if their particular philosophy fits with the way you think, they're probably great. For me, they just don't seem to fit and provid
by warp 17y ago
I'm not a fan of frameworks, if their particular philosophy fits with the way you think, they're probably great. For me, they just don't seem to fit and provide a lot of bloat.
I prefer to start small, and add libraries as I need them.
For example, for my current project I was at the point where I needed to add authentication/authorization, preferably with openid support and fallback to a simpler system for development/test installs. I've been able to implement most of this with very little effort by using repoze.who and repoze.what (python). They're flexible enough to do a few things which would be harder to do in a framework where components are written to interface with other parts of the framework, instead of being really generic.
Apart from those two libraries I use beaker for sessions, werkzeug for dispatch, couchdb as a database, mako for templating, my own forms library, etc..
Basically I put together my own framework from already existing components, with a few components of my own for those tasks where I feel the existing solutions aren't good enough or don't solve my problem.
With this approach it does take longer to get up to speed, but you're not tied to any particular way of doing things and can replace any part as needed.
- axod 17y agoCompletely agree. The best framework is one you've built yourself IMHO.
- randallsquared 17y agoThe best framework is the one you would have built yourself, but which is improved and promptly bugfixed by someone else. :)
- axod 17y agoI still disagree. Frameworks are usually multipurpose general 'jack of all trades master on none' type things. Unless you've built your own based on some specific use case(s). It's extremely unlikely that it'll be improved by someone else in exactly the direction you need it to be improved based on your particular use case. Depends how important it is to your success though.
- intranation 17y ago... except where you have new employees who need to use it, and you don't have any documentation. This is, to me, the one of the best parts about using Django or Rails--the ramp up time for new hires is lessened by being able to hire experienced developers in "framework X" from the get go, or when hiring juniors one can simply point them at a tutorial.
- didip 17y agoI agree with your points, although i ended rolling with pylons as the foundation. It allows me to add extras such as gzip wsgi layer, secondary dbs (tokyo and mongo), and roll my own custom routes with little effort.
- Tichy 17y agoI sympathize, but there seems to be so much stuff that goes into a web framework. One of these days I want to make a list, to help deciding on "create my own" vs "external". Maybe if there are libraries for all the needs in your language, it is doable. But it seems a bit of a headache. I am not sure I even want to waste time on thinking about my own framework. It is not the most interesting problem (how to write a web framework).
- didip 17y agoI forgot to ask. I haven't had experience with repoze. Do you like it? Do you prefer it instead of rolling your own?
- warp 17y agoWell, I've only used repoze.who and repoze.what. I started implementing my own .auth library before I found those two. repoze.who is exactly what I had in mind for an authentication library, and much better architected than my own solution. I don't use any of the existing plugins (apart from openid), so the real win for me is the improved design compared to whatever I could come up with.
- jacquesm 17y agoI was very much of that opinion before as well. But I've since come to change my mind. I'd like to concentrate on those parts that are unique about the application that I write, not the stuff that every application has to do anyway. This takes a lot of time and effort to maintain, especially if you want to stay 'current' and want to compete with the rest of the market. If what you make is limited in scope and you can easily handle the worlkload then more power to you. But I find that for me it is more efficient to reuse well written code, even if that means I can't claim I wrote 100% of the project. If a framework limits you, then that is a good reason to roll your own. But that comes at a price, maintaining a codebase is not without cost.
- RyanMcGreal 17y agoLikewise, I code in Python with mod_wsgi, web.py, SQLAlchemy and a library I've built up of common classes and functions: * Mod_wsgi - standard (and imho best) way to connect code to a web application. * web.py - a framework for people who don't like frameworks. It does exactly what you want it to do and then gets out of the way. * SQLAlchemy - the benefits of a smart ORM, from being able to define a Model in native Python to the baked-in protection against SQL injection attacks, more than justify the cognitive overhead involved in learning it.