|
1 |
| -Seperation of Concerns |
2 |
| -Separation of concerns is a design principle to separate and break a piece of software into distinct sections that do not overlap in functionality or do but as little as possible. It is for software maintainability, as it aims to increase the effectiveness of the piece of software and allow code reuse. If SoC is not applied, it would be difficult to modify, test, or debug the code. Example on SoC: HTML, CSS and JavaScript: HTML defines the page structure while CSS defines how the page is presented and JavaScript defines how the content interacts with the user. If we need to change the interface of a webpage, we should not need to change the business logic of the software. Separation of concerns is achieved through modularity. |
| 1 | +####Seperation of Concerns |
| 2 | +##Separation of Concerns |
| 3 | + Separation of Concerns (SoC) is a design principle to separate/break a piece of software into distinct sections that do not overlap in functionality or might do but as little as possible. |
| 4 | + It is for software maintainability, as it aims to increase the effectiveness of the piece of software and allow code reuse. |
| 5 | + If SoC is not applied, it would be difficult to modify, test, or debug the code. |
| 6 | + Separation of concerns is achieved through modularity. |
| 7 | + If we need to change the interface of a web page, we should not need to change the business logic of the software. |
3 | 8 |
|
4 |
| -Front End vs Back End |
5 |
| -Frontend is the presentation layer- handles accessibility concerns, asynchronous requests, web languages like HTML, CSS and JavaScript, and libraries like JQuery. Back end is the data access layer- handles the business logic, data storage and administration, security concerns… There are some crossovers between front end and back end development, as some presentation work is done on the server |
| 9 | +#Example on SoC: |
| 10 | + HTML, CSS and JavaScript: HTML defines the page structure while CSS defines how the page is presented and JavaScript defines how the content interacts with the user. |
| 11 | + |
| 12 | +###Front End vs Back End |
| 13 | +##Front end (or the presentation layer) handles: |
| 14 | +* accessibility concerns |
| 15 | +* asynchronous requests |
| 16 | +* web languages like HTML, CSS and JavaScript |
| 17 | +* libraries like JQuery |
| 18 | + |
| 19 | +##Back end (or the data access layer) handles: |
| 20 | +* the business logic |
| 21 | +* data storage and administration |
| 22 | +* security concerns |
| 23 | +* scalability |
| 24 | + |
| 25 | +Note: There are some crossovers between front end and back end development, as some presentation work is done on the server |
| 26 | + |
| 27 | + |
| 28 | +###Server vs. Client Side |
| 29 | +##Client side validation and server side validation |
| 30 | +In the Client Side Validation you can provide a better user experience by responding quickly at the browser level. |
| 31 | +When you perform a Client Side Validation, all the user inputs validated in the user's browser itself. |
| 32 | +Client Side validation does not require a round trip to the server |
| 33 | +In the Server Side Validation,the input submitted by the user is sent to the server and validated using one of server |
| 34 | +side scripting languages such as ASP.Net, PHP etc. After the validation process on the Server Side, the feedback is sent back to the client by a new dynamically generated web page. |
| 35 | +It is better to validate user input on Server Side because you can protect against the malicious users, |
| 36 | +who can easily bypass your Client Side scripting language and submit dangerous input to the server. |
| 37 | + |
| 38 | +##Server-side templating and Client-side templating |
| 39 | +Server-side templating means that the content gets rendered, that is the resulting HTML code from the server |
| 40 | +While Client-side templating means the resulting HTML gets rendered in the browser through the use of Javascript libraries. |
6 | 41 |
|
7 |
| -Server vs. Client Side |
8 |
| -there are basically two programs running at the same time: The code that lives on the server and responds to HTTP requests. The code that lives in the browser and responds to user input. Client side validation and server side validation In the Client Side Validation you can provide a better user experience by responding quickly at the browser level. When you perform a Client Side Validation, all the user inputs validated in the user's browser itself. Client Side validation does not require a round trip to the server In the Server Side Validation,the input submitted by the user is sent to the server and validated using one of server side scripting languages such as ASP.Net, PHP etc. After the validation process on the Server Side, the feedback is sent back to the client by a new dynamically generated web page. It is better to validate user input on Server Side because you can protect against the malicious users, who can easily bypass your Client Side scripting language and submit dangerous input to the server. Server-side templating means that the content gets rendered, that is the resulting HTML code from the server While Client-side templating means the resulting HTML gets rendered in the browser through the use of Javascript libraries |
9 | 42 |
|
10 | 43 | Alternative backend technologies:
|
11 | 44 | PHP - one of the most popular language for web development, its pre-installed in almost all hosting services and has a syntax very similar to C and JAVA.
|
|
0 commit comments