Learn about Framework – Introduce some popular Framework.

Tram Ho

Preamble

Frameworks are the basic concepts that anyone who studies or works in software engineering should know. It is just one of the tools available to help you grow better and faster! Better yet, because a framework gives you certainty. You are developing an application that is fully compliant with structured business rules, and both are maintainable and upgradeable. So what is a framework? Why use framework? Let’s find out in the following article.

1. What is a framework?

Frameworks are pre-written code, constituting a packaged framework and programming libraries. They provide built-in features such as model, API and other elements to minimize the development of rich, dynamic web applications. The framework is like we have the home frame is made available basic foundation, you just need to build and furnish as you like.

The framework provides programmers with the most basic functions. There the programmers receive assistance in the process of building and developing their websites and web applications. We can compare frameworks as a set of “Materials” for each domain for programmers. There are frameworks that developers do not need to design before using, which saves them time. So developers only need to learn and create frameworks to create their own products.

For example: To design an e-commerce website, if there is no specialized framework for e-commerce web design. Now the programmer must create his own links and then assemble them. On the other hand, if a framework is available, programmers just need to pull out the framework of what they need to build the web and put the parts together. You simply imagine this framework as a store of building materials including sand, stone, cement, … Programmers will take out these materials and design them to create them. Products with different shapes.

2. How the framework works.

The frameworks are designed to save time and support keyboard shortcuts. It is true that you can make a very simple website or a modern web application without it. The framework optimizes the development process and allows the use, modification and integration of code to simplify work. All professional programmers know how to use one or more different frameworks. And different framework support 1 or corresponding programming language group.

According to statistics, the use of frameworks allows more programming in less time but with a much higher quality. That’s because even an inexperienced developer using the framework can easily integrate great code into his program and this is generally what the developer does because of a multitude of processes. already exists the perfect code. All that’s left is to integrate it. Suppose your project needs process A + Process B + Process C. The developer finds the best code for each process and unifies them, operating in a single framework.

Unlike libraries, frameworks allow for the reverse of code control. Therefore, if you need to determine what a rule or behavior is, say it is a tool used to build applications.

3. Key features of the framework.

The framework has thousands of features, but I just list some of the most important features that the framework supports writing code including:

  • Simplify the process of designing and building interfaces.
  • Reduce / eliminate repetitive tasks.
  • Increase application flexibility through abstraction.
  • Reuse the code.
  • Support and simplify the use of new and complex technologies.
  • It links together a series of separate objects / components into a more useful system.
  • Everyone can easily test and debug the code, even the code for which they are not involved in the project.
  • A closed process from interface design, code and software testing.

4. Advantages – Disadvantages of the framework

4.1 Advantages

Frameworks are an important part of creating a lot of software / applications today. It brings a lot of advantages such as:

  • The framework has common features for the application / software. For example, most e-commerce websites need to have registration, login, and user data management, etc.The framework has built these features and programmers only need to use them when build a website.
  • Help programmers save maximum time and effort when developing software / applications.
  • Allow application products to inherit standardized features and structures. This makes the operation and maintenance / troubleshooting application easier.
  • Allow users to expand arbitrarily based on what the Framework has provided. Programmers can extend features by selectively overwriting existing classes or adding new functionality on the Framework platform, provided that certain standards are followed.

4.2 Disadvantages

Besides the practical benefits, the Framework also has certain disadvantages:

  • It takes a lot of time and effort to learn how to master the Framework
  • When using the Framework, the size of the application / software will be very large. In many cases, a website can weigh up to hundreds of megabytes of code even without any content.
  • When writing code, programmers need to adhere to the rules set by the Framework.
  • Frameworks are usually large in size, so they are not suitable for developing applications that are too small. For example, if you want to build a small application that updates the information of Dalat Flower Festival 2019, the use of Framework is not necessary. Instead, writing your own code will save you a lot of time.

5. Why use framework?

5.1 Invest in tasks, not in technology

This is the basic principle of a framework. Not reinventing the wheel. And eliminating caveat, low-value-added tasks to focus entirely on business rules. (E.g., developing common components)

For example, a framework will help developers not have to take 2 or 3 days to create an authentication form. (Not a specific task). Saved times can be reserved for more specific components as well as for the corresponding unit tests. Gives you solid, durable and high quality code.

5.2 Guarantee for upgrades and maintenance

In the long run, a framework ensures the longevity of your applications. If a development team works as they please. Only that specific group can maintain and upgrade the application easily. The way a publisher supports a proprietary solution.

On the other hand, the structure that a framework works for the application makes it possible to avoid these pitfalls. And it gives any developer.

  • Whether or not they are involved in its development
  • Ability to easily apply applications. To maintain it from time to time and to upgrade it quickly and neatly, whenever needed.

In this regard, a frame is not a black box! it is still PHP … Applications are developed without limitation in the universe and they can interact with any other PHP library.

6. Compare framework with other technology.

6.1 Framework comparison and CMS

6.1.1 What is CMS?

As the name implies, CMS – short for Content Management System (meaning Content Management System) helps business owners manage their website content. Once the website is complete and ready for use, you can log in and access any website functionality.

You can then change the text content on any page, start an Ecommerce site, manage inventory, add new products, change product prices, and perform any of the following functions. when you have access to the website via CMS. In short, you can easily make changes to your website without having to depend on developers. Some of the most popular CMS options are Drupal, WordPress and Joomla.

The main functions of CMS include:

  • Create and store content
  • Edit content
  • Transfer in and share content
  • Search and decentralize users

6.1.2 Comparison

– CMS is a content management system, often used in website construction, and it can be considered a finished product. Building a website sometimes just requires drag-and-drop or installing additional features.

– Framework is the foundation for building a website. Unlike CMS, building a website with framework requires more effort and technique and takes more time.

– Framework can be used to build a CMS, while not

– Framework can be used to build software for computers, phones or websites

6.2 Comparison of Framework and Library

6.2.1 What is a library?

Library is a collection of functions and classes that are written to be reused. Each function or class serves a specific task. Functions and classes that can be called by predefined commands help programmers save time in processing algorithms. In addition, being able to reuse also helps the system to be neat, reduce shitcode, increase the data processing speed for the system. Library is not a major component of the system, so the use or not does not affect the operation of the software, the system.

6.2.2 Comparison

– The Framework and Library both provide pre-written functions so we can reuse.

– Larger framework and more complex Library.

– Using the Framework you must change the project’s code structure (project’s structure) according to the rules of that framework to be able to use the functions that framework provides.

– We can use Library functions directly without changing the code structure of the project.

– Framework can be understood as a program framework, users add code and follow the rules to create the application. Library only provides utility functions or classes to use in building applications.

– The active framework. That is, it can make decisions about being called or called by certain libraries or applications.

– Library passive operation. Meaning it is only called when we need to use it.

7. Types of frameworks.

Currently there are many frameworks for backend, front end, mobile applications … the most popular are probably web frameworks and mobile frameworks.

7.1 Web framework

The WEB framework is a software framework designed to support the development of web applications including web services, web resources, and web APIs, providing the functionality needed to create a Web application.

Web application frameworks are software frameworks used to streamline web applications and website development, web services, and web resources. A common type of web application framework is the Model-View-Controller (MVC) architecture. As we know to program a website we use up to 3 component languages: HTML, CSS and Javascript then combine with a server scripting language such as PHP, ASP.NET , JAVA … with each component. This part we have different frameworks.

By using WEB framework programmers can develop based on thousands, tens of thousands of lines of code written by professional engineers, even beginners will be able to develop complete WEB applications. In a short period of time, when developing an application according to the rules of the WEB framework, programmers can easily add various functions and prevent network attacks without writing a large number of them. code.

Every programming language has at least one framework. The libraries in each framework provide reusable packages for that language.

A framework for the web includes:

  • Libraries: Libraries are built-in code for a function (Design pattern), you can reuse that function without having to re-code it. There are many library management tools like NPM, Composer …
  • API: is the method of exchanging data between main applications and other applications. Read more about what RESTful API is.
  • Scaffolding: A set of rules framework that an MVC framework using database planning can be accessed.
  • AJAX: update information on database without reloading page.
  • Caching: helps reduce requests to the server, increasing page load speed.
  • Security: framework for authentication and user authorization.
  • Compilers: compiler from your code through the machine language.

7.2 Framework for Mobile

The framework for mobile apps allows you to write code once and can run on iOS and Android. That’s its strength to reduce product development time compared to native code. Currently these frameworks mostly use Javascript as a prominent development language such as React Native of Facebook, in addition to Microsoft’s Xamarin using C #, Flutter uses Google’s Dart language.

8. Introduce some popular frameworks.

8.1 Some common web frameworks

8.1.1 Ruby Web Framework: Ruby on Rails

URL : http://rubyonrails.org/

Ruby on Rails is a powerful and interesting framework developed on the Ruby programming language. The first version of Ruby on Rails was introduced to the community in 2015. Ruby on Rails is a free and open source software developed by David Heinemeier Hansson.

Ruby is a programming language, using Ruby, developers can develop many different types of applications besides creating websites such as software running on personal computers or servers. Ruby on Rails is a web framework written using the Ruby language. Ruby on Rails is limited to building and developing web applications.

Reasons Ruby on Rails is so popular:

  1. Easy-to-learn Ruby language, complete framework (full-stack), insightful and intelligent function definitions (by conventions)
  2. Rails uses less code than other frameworks, speed to create prototypes (sample applications) quickly but at less maintenance costs.
  3. Understanding Rails, you will easily understand other modern frameworks of PHP, Python, ..

Right from the first time using Ruby on Rails, a Web developer named David Heinemeyer Hanson said that “10 times more efficient than Java”. In fact, there are many famous websites written based on this framwork like CookPad 、 Retty 、 Wantedly, …

8.1.2 PHP Web Framework: CakePHP

URL : http://cakephp.jp/

CakePHP is a Web Framework created with the purpose of providing a framework for PHP users at all levels to develop fast, powerful and flexible. CakePHP is a simple web framework, building an environment is relatively easy.

Currently, it is introduced [the largest number of web applications] on a global scale, providing functions that can meet the high demands of users. In PHP, there are many popular frameworks, but if you are a beginner developer, CakePHP is the best choice. It was created for beginners, most do not need to modify the operating environment and change server settings and still be able to put into use easily.

CakePHP has a truly remarkable showcase that powers websites of major brands such as BMW, Hyundai, and Express. This is a great tool for creating web applications that require a high level of security, as it has many built-in security features such as input validation, SQL injection prevention, XSS (cross-site scripting), CSRF (cross-site request forgery), and more.

8.1.3 WEB Framework for JAVA: Spring

URL : https://projects.spring.io/spring-framework/

Spring framework is an open source Java Platform, a lightweight solution for Java Enterprise. With Spring Framework developers can create code that is high-performance, easy to test, and reusable. The core features of the Spring Framework can be used in developing any Java application or building web applications on the Java EE platform. The goal of Spring Framework is to make J2EE application development easier and promote better programming using POJO-based model.

Spring Framework is developed based on the following views:

  1. Simplify development work through the use of simple Java objects, also known as POJO (Plain Old Java Object)
  2. Loosen constraints between components through the use of Dependency Injection and write interfaces
  3. Approach the declarative programming using rules (convention) and common aspects
  4. Minimize boilerplate and boilerplate code (boilerplate) through the use of templates and aspects
  5. Spring Framework is often used when developing large-scale systems.

8.1.4 JavaScript Web Framework: Angular

URL : https://angular.io/

Angular is a JavaScript framework for building dynamic web applications (dynamic web apps). This is a very powerful Javascript Framework and is often used to build a Single Page Application project (SPA). It works based on HTML extension attributes (atributes according to Angular rules). AngularJS is a framework with relatively large functions like Ruby on Rails. However

  1. Angular is a Javascript-based development framework for creating rich web applications
  2. Angular is often used to develop frontend through APIs, using a very powerful MVC model
  3. Angular source code automatically fixes with different browsers, so you don’t need to worry about browser compatibility issues
  4. Angular is open source, completely free and developed by thousands of developers around the world.

8.1.5 Framework used in Design of CSS / JS: Bootstrap

URL : http://getbootstrap.com/

Bootstrap is called web design framework and is structured from CSS / JavaScript. Bootstrap is a framework developed by Twitter so we can easily create a flat design like Twitter. Bootstrap is a combination of attributes and values ​​available to help web designers save time to implement a web project without creating additional css, javascript, html, and font code while they are repeated.

The great thing about Bootstrap is that Responsive Web Design is able to respond to many different screen sizes (PC, Tablet, SmartPhone), so that even the programmers who are not good at designing can create the delivery. Nice look easily. Bootstrap templates are extremely rich from free to paid, so by changing the color, typography … then we can completely create the site according to our imagination.

8.2 Some popular mobile frameworks

8.2.1 React Native

URL: https://reactnative.dev/ React Native is a framework that allows mobile application developers to design cross-platform mobile applications with the help of javascript. With React – Native, developers can use a unique set of code for both iOS and Android platforms.

Advantages:

  • Time efficient when you want to develop an application quickly.
  • Performance is relatively stable.
  • The community thrives.
  • Save money.
  • Small development team.
  • Reliable and stable application.
  • Built for many different operating systems with the least native code.
  • A better user experience is the hybrid app.

Defect:

  • Still requires native code.
  • Performance will be lower with pure native code.
  • Security is not high due to JS-based.
  • Memory management.
  • The ability to customize is not really good for some modules.

8.2.2 Flutter

URL: https://flutter.dev/

Flutter is Google’s mobile UI framework for creating high quality native interfaces on iOS and Android in a short span of time using the Dart language. Flutter works with available source code, used by developers and organizations around the world, and it’s open-source and free.

8.2.3 Xamarin

A cross-platform mobile application programming platform (meaning that code can run on both iOS and Android at a time). Xamarin has unique and rare features compared to current frameworks on the market when native access and native user experience are still being questioned.

Advantages:

  • Xamarin’s sample application helps the job get started smoothly; The application is written very clearly and can also be used as a reference form.
  • Xamarin can share up to 75% of the code written to major mobile platforms, thereby saving a lot of time and money.
  • Provides functionality testing and quality assurance (feature testing and quality assurance) for countless devices to ensure accurate integration (Xamarin even has its own Android emulator)

Defect :

  • With Xamarin, because of compatibility issues, you still won’t be able to use countless open source libraries for iOS and Android. The free version is extremely limited, making it difficult to use in large projects.

8.2.4 PhoneGap

URL: https://phonegap.com/

PhoneGap is also an open source cross-platform mobile application that allows developers to build mobile applications using HTML, CSS and Javascript. It focuses an auxiliary architecture to help programmers by creating outstanding applications with using device capabilities through APIs.

Advantages:

  • Allows creating hybrid applications with popular web technologies (HTML5, CSS3 and JavaScript),
  • Allows you to deploy a single code base on many different platforms, including iOS, Android, Windows Phone, BlackBerry, Firefox OS, …
  • The structure allows for the application of plugins, extensions (modularity) of device APIs, and many other benefits.
  • Allow application integration / in-app payment through App Store for iOS, Google Play Store for Android, …

Defect :

  • Limited graphic support for the application. You can obviously find some plugins for specific requirements, but plugins for some necessary platforms may be outdated, or abandoned.

Conclude

Above are the concepts according to my understanding of Framework, types of frameworks and frameworks that are widely used by users. Hopefully with the article you will better understand them. Since then you have the right options for you, remember that using the good frameworks will save you a lot of time.

Thank you for taking the time to write your own. My article is difficult to avoid mistakes, I hope you will understand and can respond to me to edit to give everyone the most accurate information.

And finally, wish you all good health and have a happy working day, effective !!!

References

https://topdev.vn/blog/framework-la-gi/

https://techtalk.vn/web-framework-la-gi-top-5-web-framework-tot-nhat exportedjava-ruby-php-js-css conscious.html

Share the news now

Source : Viblo