We want to hear from you! We are looking for web developers to participate in user research, product testing, discussion groups and more. Apply now to join our WebDev Insights Community. Apply Dismiss. Documentation Chrome Apps Concepts. Table of contents. Why build a Chrome App? Expand your potential audience Extend your development capability Who should build Chrome Apps? Chrome Dev Editor. We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Design patterns are important to write maintainable and reusable code. A pattern is a reusable solution that can be applied to commonly occurring problems in software design—in our case—writing Chrome Apps.
We recommend that developers decouple the app into a series of independent components following the MVC pattern. While they all have their unique advantages, each one of them follows some form of MVC pattern with the goal of encouraging developers to write more structured JavaScript code.
MVC offers architectural benefits over standard JavaScript—it helps you write better organized, and therefore more maintainable code. This pattern has been used and extensively tested over multiple languages and generations of programmers. Model is where the application's data objects are stored. The model doesn't know anything about views and controllers. When a model changes, typically it will notify its observers that a change has occurred.
To understand this further, let's use the Todo list app, a simple, one page web app that tracks your task list. The model here represents attributes associated with each todo item such as description and status. When a new todo item is created, it is stored in an instance of the model.
View is what's presented to the users and how users interact with the app. For example, in the above todo list web app, you can create a view that nicely presents the list of todo items to your users. Users can also enter a new todo item through some input format; however, the view doesn't know how to update the model because that's the controller's job.
The controller is the decision maker and the glue between the model and view. The controller updates the view when the model changes. It also adds event listeners to the view and updates the model when the user manipulates the view. In the todo list web app, when the user checks an item as completed, the click is forwarded to the controller.
Chrome wants to meet developers where they are at. While the browser may not use the same open-source projects web application developers do, they want to do their part to make sure libraries and frameworks that help developers build great experiences can succeed and thrive. Chrome designed their current fund to support open source projects thinking about performance impact, regardless of where they are in their life cycle. Whether big or small, young or old, all open source projects deserve to be cared for.
Reflect upon what you need, be honest about who you are, and ask. Another influencing factor for the Chrome Framework Fund portfolio is evaluating theimpact their contribution will realize. Sure, the popularity of an open project matters but an investment in a small project can go a long way.
0コメント