Some of you may have noticed a mention of something called Constrictor on the home page. And I would like to quickly go over exactly what Constrictor is and what my aims are with it. Constrictor is a high-performance Python web-development framework centered around speed and simplicity. However, “simplicity” can be interpreted many ways; in this case, the simplicity implies code that will be fairly basic, not arcane, and extremely easy to understand. In most cases, any sort of “magic” that is so familiar in Ruby will be eschewed in favor of logical, heavily documented systems and standards of development.
The Magic of Python
The most exciting part (in my opinion) of Constrictor is the fact that it is in Python and will be heavily using Python’s module/object-oriented programming style. Models will be registered with the system instead of being automatically detected and imported in an invisible process that the programmer has control over. The same will be done with Controllers, Views, and Queries (which will be discussed later). One of the disadvantages of Python is that it often lacks the “elegance” of Ruby, though I hope its eventual power and speed will make up for that.
Queries
Constrictor will be, by default, ORM-agnostic. However, it will be bundled with built-in ORM’s for many popular databases. One of the most exciting features of these ORM systems is their use of a new system of interfacing with the database. Unlike ActiveRecord and other popular platforms, which use only Models to define a table, Constrictor will use both Models and Queries. Models are related to the actual rows of a table; they define the structure of the table, and each row of result data from a query will be, by default, returned in a Model. Queries, on the other hand, are related to the actual querying of the database. They can be related to tables, such as the IntelligentQuery system, which will make a Query directly related to a Model and automatically add methods to the Query to make it easier to perform common queries on the table. However, Queries can also simply be boxes in which to dump routines for querying the database. The flexibility of the Query will hopefully allow it to take up a role that has only been vaguely defined and only partially filled in previous ORM platforms.
Feel free to contact me if you are interested in helping out with the development of Constrictor. You can catch pre-alpha releases on GitHub.