{"_id":"553d394e9660ba0d00569d13","__v":2,"api":{"auth":"never","params":[],"results":{"codes":[]},"url":""},"category":"553d394d9660ba0d00569d08","hidden":false,"link_url":"","order":0,"slug":"introduction","sync_unique":"","title":"Introduction","type":"basic","updates":[],"excerpt":"glim - a modern python framework for the web","githubsync":"","user":"543466ea0e8e2b0e00341818","body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Not Complete\",\n  \"body\": \"This documentation is not complete currently. You can check the [github page](http://github.com/aacanakin/glim) and the current [docs](http://aacanakin.github.io/glim) for more information.\"\n}\n[/block]\nglim is a modern web framework on top of [bottle](http://bottlepy.org/docs/0.12/) inspired from [play](https://www.playframework.com/) & [laravel](http://laravel.com/). The aim is to build a lightweight architecture for painless web app development in python.\n\nThe development philosophy here is to make the core small as possible but still not featureless. Therefore, the features that are not common in every web app are decomposed into extensions of glim. It is inspired from great web frameworks like [play](https://www.playframework.com/) and [laravel](http://laravel.com/).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Features\"\n}\n[/block]\nCurrently, glim has all features to make a typical crud web app or a web service. Some of them are the following;\n- A powerful [routing](doc:routing) system which is RESTful by default.\n- A [controller](doc:controllers) layer for request handling, service calling, etc.\n- A [service](doc:services) layer to implement reusable controller functions.\n- An object oriented [command line](doc:commands) layer\n- An [extension system](doc:extension-system) that allow developers to integrate extensions to the framework\n- A handful set of extensions which includes SQLAlchemy, Jinja2, redis integrations\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Raison d'être\"\n}\n[/block]\nThe development of this framework is a result of my personal curiosity to the advanced topics of python.\n\nAlthough there are great web frameworks for python out there, glim development approach is completely different. It is a little bit tough to know how much differences there are on the python world when comparing to other programming languages. If you are coming from a different programming languages, you may notice some conceptual differences between other programming languages. Glim is about bringing the common practices that achieved consensus through the web world so that a non pythonista can also feel like home.\n\nMoreover, it is obvious that glim is not reinventing the wheel. It has dependencies to the best python open source projects out there. Glim is about providing the functionality of these interfaces that are put into a beautiful box.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"A note on other frameworks\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Flask & Django\",\n  \"body\": \"I had a chance to flirt with both of these great frameworks. I think they have many advantages in terms of community. However, people keep asking me to compare the frameworks because they tend to be biased at the first look after seeing the dependency list. So, no harm intended. It's just a part that exposes the differences.\"\n}\n[/block]\n\nAt the first glance, after seeing the library dependencies of glim (Werkzeug, Jinja2, SQLAlchemy), one might ask the most fair question;\n\n**How is it different from Flask ?**\n\nIt is obvious that the creators of flask doesn't want to direct strictly developers in terms of building an app structure, configuration structure, etc. Therefore, it is not a convention over configuration framework. However, glim is all about conventions, directing to the best practices, etc. So, there are lots of ways to implement a feature in flask. However, in glim, although the same solutions can be done very differently, it guides through the solution which is hard to make different.\n\nConsider an example of an rdb integration. Flask has a documentation on how to integrate SQLAlchemy with a single `app.py` really easily. However, the `app.py` relatively different than a simple \"Hello World\" app. From glim framework's perspective, this kind of difference should not happen. In glim, there is the `db` module that exposes the features of SQLAlchemy while still keeping the framework lightweight because, it takes 4 lines of code to comment out in configuration to completely disable `db` module. So, glim may be named much more closer to the \"full-stack\" approach.\n\n\"So.. you say it's more full-stack, then..\"\n\n**How is it different from django ?**\n- Not answered yet :)\n\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]","createdAt":"2014-10-15T17:30:08.744Z","link_external":false,"project":"543467200ef9c00800164ecc","version":"553d394d9660ba0d00569d07","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Introduction

glim - a modern python framework for the web

[block:callout] { "type": "warning", "title": "Not Complete", "body": "This documentation is not complete currently. You can check the [github page](http://github.com/aacanakin/glim) and the current [docs](http://aacanakin.github.io/glim) for more information." } [/block] glim is a modern web framework on top of [bottle](http://bottlepy.org/docs/0.12/) inspired from [play](https://www.playframework.com/) & [laravel](http://laravel.com/). The aim is to build a lightweight architecture for painless web app development in python. The development philosophy here is to make the core small as possible but still not featureless. Therefore, the features that are not common in every web app are decomposed into extensions of glim. It is inspired from great web frameworks like [play](https://www.playframework.com/) and [laravel](http://laravel.com/). [block:api-header] { "type": "basic", "title": "Features" } [/block] Currently, glim has all features to make a typical crud web app or a web service. Some of them are the following; - A powerful [routing](doc:routing) system which is RESTful by default. - A [controller](doc:controllers) layer for request handling, service calling, etc. - A [service](doc:services) layer to implement reusable controller functions. - An object oriented [command line](doc:commands) layer - An [extension system](doc:extension-system) that allow developers to integrate extensions to the framework - A handful set of extensions which includes SQLAlchemy, Jinja2, redis integrations [block:api-header] { "type": "basic", "title": "Raison d'être" } [/block] The development of this framework is a result of my personal curiosity to the advanced topics of python. Although there are great web frameworks for python out there, glim development approach is completely different. It is a little bit tough to know how much differences there are on the python world when comparing to other programming languages. If you are coming from a different programming languages, you may notice some conceptual differences between other programming languages. Glim is about bringing the common practices that achieved consensus through the web world so that a non pythonista can also feel like home. Moreover, it is obvious that glim is not reinventing the wheel. It has dependencies to the best python open source projects out there. Glim is about providing the functionality of these interfaces that are put into a beautiful box. [block:api-header] { "type": "basic", "title": "A note on other frameworks" } [/block] [block:callout] { "type": "success", "title": "Flask & Django", "body": "I had a chance to flirt with both of these great frameworks. I think they have many advantages in terms of community. However, people keep asking me to compare the frameworks because they tend to be biased at the first look after seeing the dependency list. So, no harm intended. It's just a part that exposes the differences." } [/block] At the first glance, after seeing the library dependencies of glim (Werkzeug, Jinja2, SQLAlchemy), one might ask the most fair question; **How is it different from Flask ?** It is obvious that the creators of flask doesn't want to direct strictly developers in terms of building an app structure, configuration structure, etc. Therefore, it is not a convention over configuration framework. However, glim is all about conventions, directing to the best practices, etc. So, there are lots of ways to implement a feature in flask. However, in glim, although the same solutions can be done very differently, it guides through the solution which is hard to make different. Consider an example of an rdb integration. Flask has a documentation on how to integrate SQLAlchemy with a single `app.py` really easily. However, the `app.py` relatively different than a simple "Hello World" app. From glim framework's perspective, this kind of difference should not happen. In glim, there is the `db` module that exposes the features of SQLAlchemy while still keeping the framework lightweight because, it takes 4 lines of code to comment out in configuration to completely disable `db` module. So, glim may be named much more closer to the "full-stack" approach. "So.. you say it's more full-stack, then.." **How is it different from django ?** - Not answered yet :) [block:api-header] { "type": "basic" } [/block]