For Scientific Research
Photo: © Stanza. Used with permission.
Image: Matt Raible
Frameworks: If they did not exist, you'd want to build your own.
- Reduce repetitive programming tasks
- Isolate error opportunities and reduce errors
- Improve potential securability
- Leverage collaborative development and contributed assets
- High-Level
- Low/Language Level (IDEs)
- General Purpose (CMS)
- Learning Oriented (LMS)
- Purpose-driven (Wordpress)
- Document-oriented (DMS)
- Code generators
- WYSIWYG Editors (example: Dreamweaver)
- Frameworks may have existed before the advent of the World Wide Web
- Web-oriented tools^ evolved concurrently with the Web.
- The Web really launched what people think of as frameworks
- More recently, threats posed across the Internet and Web have made use of a framework almost compulsory.
^ PHP, 1995; Python 1989; Perl/CGI, 1997
People who talk about "framworks" also talk about "stacks".
Think about, for example, the LAMP^ stack.
The concept of a stack provides a clearer understanding of separation of functions.
^ Linux, Apache, MySQL(MariaDB), PHP (/Perl/Python)
Layer | Function |
---|---|
Person | You |
PHP/Perl/Python | App Delivery Scripting |
Apache | Web Server |
MySQL/MariaDB | Database |
Linux | Operating System |
- General goodness-of-fit/orientation
- Cost and learning curve
- Strength of technology, stability, APIs?
- Adoption, Community, and "Trajectory"
- Security track record
- Feasibility of underpinnings (language and constructs), esp. over long-term
- Specific "must-have" functions/requirements
- Your workflow (and more...)
-
Model-View-Controller design provides for separation of functions and better organization.
-
MVC frameworks typically rely on "OOP" (Object-Oriented Programming) constructs.
-
Frameworks often interact with data through Object-Relational Mapping (ORM) to relational databases.
-
Ruby: Ruby on Rails (RoR)
- rubyonrails.org
- The original, popular web framework. Complex.
-
Python: Django
- djangoproject.com
- Newer. Intriguing.
-
PHP: CakePHP
- cakephp.org
- Easier to set up. What we'll demo.
-
Many, many more (a comparison)
- MVC
- Object Oriented traits
- DRY - Don't Repeat Yourself
- inheritance, plugins, helpers, behaviors
- CoC - Convention over Configuration
Examples:
- Tables are plural (people)
- Reference is singular (person)
- Foreign keys always reference "reference_id"
- Pre-ordained file structure
- Need multi-user access "by tommorrow"?
- Need app security (role based access, encryption)?
- Is this your job (app development can become "full-time")?
- Can you cope with the fine print (code)?
- Are you creating a legacy (that others can mantain)?