Introduction to Python’s Django This article is part 1 of 12 in the series
What is Web DevelopmentWeb development is a broad term for any work that involves creating a web sitefor the Internet or an intranet. The end product of a web development projectvaries from simple sites composed of static web pages to complex applications thatinteract with databases and users. The list of tasks involved in web developmentincludes web design, web content development, client-server scripting, web serverand
development means the non-design aspect of building web sites: coding.
Large enterprises often have hundreds of people working in its IT / web developmentdepartment. For example, an university often requires lots of web developers,graphic designers, information system architects to work on its vast web-basedinfrastructure so that students can register classes, professors can upload scores ofthe exams, etc. In contrast, smaller companies and individuals often require one ortwo web developers and / or graphic designers to create a web site for them.
What is a Web FrameworkIn order to work on a web development project, a programmer is required to leverageone of the numerous web frameworks to write code that's dedicated to function asa highly efficient and scalable web server that manages and serves content to endusers.
A web framework is a software library that is designed to help the development ofany web site. By packaging common web functionalities into itself, a web frameworkallows programmers to create web sites using out-of-the-box code and infrastructureso that they can focus on building business logic oriented features of the website instead of writing code that deals with common web programming tasks overand over again. For example, most web frameworks provide libraries for databaseaccess, templating engine and web session management. Without a web framework,one would be forced to write the same boiler-plate code to handle these commontasks whenever one starts to work on a new project.
What is DjangoDjango is a free and open source web framework for Python. After its first releasein 2005, it became more and more popular among Python programmers as thede-factor framework for web development. Django emphasizes reusability andpluggability of components so that distinctive pieces of code can be plug-n-playedtogether to form a cohesive web system.
Another principle promoted by Django is DRY (Don't Repeat Yourself). DRY aims atreducing repetitive pieces of information of all kinds in software development. Forexample, instead of writing the server's static folder as a raw string everywhere inthe code, we should assign the static folder's address to a constant defined in theapplication's settings file so that we can easily change it in the future.
Besides providing libraries for common web tasks such as database interactionand session management, Django also provides an built-in admin site that allowsprogrammers and administrators of the web site to easily create, read, update anddelete database records from a GUI interface.
Websites Powered by DjangoHere's a non-exclusive list of web sites powered by Django:
As you can see, Django is more than capable to host some of the most popularsocial sharing websites such as Pinterest and Instagram as well as some of themost mission critical websites such as Bitbucket. Due to the best software practicespromoted and maintained by Django, big companies are also starting to adopt thenew technology and slowly transitioning out of J2EE.
Django vs. Other Python Web FrameworksOf course, Django is not the only Python web framework out there. Other popularPython web frameworks are:
provides only the core libraries of web development. It does not providedatabase abstraction, form validation or any other component that can beprovided a third-party component. Unlike Django, the number of out-of-the-box components provided by Flask is kept to a bare minimum, which is whyit's called a micro web framework.
source minimalistic web framework inspired by Zope, Pylons and Django. Itstrictly adheres to the MVC (Model-View-Controller) pattern and persistenceagnostic. Compared to Django, Pyramid provides an extra URL mappingmechanism called URL traversal which maps URLs to views through apredefined dictionary data structure.
inspired by Ruby-on-Rails. It follows Ruby-on-Rails' convention overconfiguration approach and provides sensible defaults for variouscomponents and libraries. Compared to Django, web2py is different becauseit handles almost everything for a programmer while providing fewerconfiguration options.
Notice that there's no ranking between these frameworks. No matter which webframework you choose, at the end of the day the most important question isanswered by yourself or your team: Do I enjoy using this framework? An enjoyable-to-use web framework brings out the highest efficiency of any programmer. Therefore, choose a framework you love and use it to create elegant web sites.
SummaryIn this article, the landscape of web development and Django is presented under abird's-eye view. In addition to learning the general basics of web development andDjango, we compared Django with other Python web frameworks and concluded thatno matter which framework you choose, you should choose one that you love to use.
STORIE COMUNI DI UN FERRAGOSTO IN CITTA’ Ci diamo appuntamento quasi con religioso senso del dovere, come si ritrovano all’immancabile raduno annuale gli orgogliosi proprietari delle auto vintage, le Bianchine, le Prinz, che in un batter d’occhio da oggetto di scherno sono diventate oggetto di culto. Nutro seri dubbi che fra 30 anni alla sciagurata Fiat Multipla toccherà la stessa sor
Classification of existing co-effects and factorsUniversity of Pecs, Faculty of Sciences, Institute of Biology, Department of Experimental Neurobiology and ZoologyCOST Action BM7040 WG 3 (in collaboration with WG4), Vienna, 28 Oct, 2011. Environmental factors: … ecological factor or ecofactor is any factor, abiotic or biotic, that influences living organisms (Wiki). Combined effec