wbs final

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Web Framework

"a software framework that is designed to support the development of web applications including web services, web resources and web APIs". -Geeks for Geeks -

SOAP

(Simple Object Access Protocol) ØSOAP is known as a transport-independent messaging protocol. ØSOAP is based on transferring XML data as SOAP Messages. ØEach message has something which is known as an XML document. Only the structure of the XML document follows a specific pattern, but not the content. ØThe best part of Web services and SOAP is that its all sent via HTTP, which is the standard web protocol. A soap web service : is any web service that uses that comply with the rules/specifications/guidelines of the SOAP protocol. What are these rule? SAOP WS uses : SOAP, UDDI, WSDL Who puts these standards?? W3C SOAP : is a protocol, a set of rules/definitions on how applications can talk to each other over the internet 1- all the exchange of data between applications has to be in XML format 2- The data exchanged between two apps is transferred in a structured Message

Uploading Website to a shared hosting

1. Pick a Reliable Web Hosting Company 2. Choose Your Website Upload Method qFile Manager qFile Transfer Protocol (FTP) qAutomatic Website Importer 3. Upload Your Website File qUsing File Manager qUsing FileZilla 4. Move the Website Files to the Main Root Directory 5. Import Your Database 6. Check If the Website Works

Routing mechanism

1.First of all, you have to create and run the root URL of your project. 2.The URL you run needs to be matched exactly with your method defined in the routes/web.php file, and it will execute all related functions. 3.The function invokes the template files. It then calls the view() function with the file name located in resources/views/ and eliminates the file extension blade.php at the time of calling. ●Route can return a String Route can return a Controller

Examples of Version Control

1.GitHub 2.GitLab 3.Beanstalk 4.PerForce 5.Apache Subversion 6.AWS CodeCommit 7.Microsoft Team Foundation Server 8.Mercurial 9.CVS Version Control (Concurrent Versions System) 10.Bitbucket

Types of VCS

1.Local Version Control System ØIf the local machine crashes, it would not be possible to retrieve the files, and all the information will be lost. If anything happens to a single version, all the versions made after that will be lost. 2.Centralized Version Control System ØIn the Centralized Version Control Systems, there will be a single central server that contains all the files related to the project, and many collaborators checkout files from this single server (you will only have a working copy). The problem with the Centralized Version Control Systems is if the central server crashes, almost everything related to the project will be lost. 3.Distributed Version Control System ØIn a distributed version control system, there will be one or more servers and many collaborators similar to the centralized system. But the difference is, not only do they check out the latest version, but each collaborator will have an exact copy (mirroring) of the main repository(including its entire history) on their local machines.

Restful Methods

1.POST - This would be used to create a new employee using the RESTful web service 2.GET - This would be used to get a list of all employee using the RESTful web service 3.PUT - This would be used to update all employee using the RESTful web service 4.DELETE - This would be used to delete all employee using the RESTful services

Web Services Architecture

1.Provider - The provider creates the web service and makes it available to client application who want to use it. 2.Requestor - A requestor is nothing but the client application that needs to contact a web service. The client application can be a .Net, Java, or any other language based application which looks for some sort of functionality via a web service. 3.Broker - The broker is nothing but the application which provides access to the UDDI. The UDDI, as discussed in the earlier topic enables the client application to locate the web service.

RESTFul Principles and Constraints

1.RESTFul Client-Server ◦This is the most fundamental requirement of a REST based architecture. It means that the server will have a RESTful web service which would provide the required functionality to the client. The client send's a request to the web service on the server. The server would either reject the request or comply and provide an adequate response to the client. 2.Stateless ◦The concept of stateless means that it's up to the client to ensure that all the required information is provided to the server. ◦This is required so that server can process the response appropriately. The server should not maintain any sort of information between requests from the client. ◦It's a very simple independent question-answer sequence. 3.Cache ◦The cache is a concept implemented on the client to store requests which have already been sent to the server. If the same request is given by the client, instead of going to the server, it would go to the cache and get the required information. 4.Layered System ◦The concept of a layered system is that any additional layer such as a middleware layer can be inserted between the client and the actual server hosting the RESTFul web service (The middleware layer is where all the business logic is created. This can be an extra service created with which the client could interact with before it makes a call to the web service.). 5.Interface/Uniform Contract ◦This is the underlying technique of how RESTful web services should work. RESTful basically works on the HTTP web layer and uses the below key verbs to work with resources on the server ◦ qPOST - To create a resource on the server qGET - To retrieve a resource from the server qPUT - To change the state of a resource or to update it qDELETE - To remove or delete a resource from the server

The key elements of a RESTful implementation are as follows:

1.Resources - The first key element is the resource itself. ◦Let assume that a web application on a server has records of several employees. 2.Request Verbs - These describe what you want to do with the resource. ◦A browser issues a GET verb to instruct the endpoint it wants to get data. However, there are many other verbs available including things like POST, PUT, and DELETE. 3.Request Headers - These are additional instructions sent with the request. ◦These might define the type of response required or the authorization details. 4.Request Body - Data is sent with the request. ◦Data is normally sent in the request when a POST request is made to the REST web services. ◦In a POST call, the client actually tells the REST web services that it wants to add a resource to the server. Hence, the request body would have the details of the resource which is required to be added to the server. 5.Response Body - This is the main body of the response. 6.Response Status codes - These codes are the general codes which are returned along with the response from the web server. ◦An example is the code 200 which is normally returned if there is no error when returning a response to the client.

Type of Web Services

1.SOAP web services. 2.RESTful web services.

How to consume or use the REST Service?

1.You can develop an application that will connect and send request to the web service provider. 2.Or use a REST Client ◦a method or a tool to invoke a REST service API that is exposed for communication by any system or service provider.

Why you may need a dedicated server

1.Your website is growing and needs to be able to handle an increase in traffic. ØAs traffic increases on a site, if you are hosting on a shared server, the server might slow down or not be able to cope with the increased views. This drop in performance may result in deterring people from visiting your site or them not staying on it. 2.Security is a concern for your website. ØWith a dedicated server, you're completely in charge of your site's security. This means you can optimize the features you need for the specific requirements of your website and stored files. Of course, you're also responsible for how these features are implemented, but this is one of the benefits of flexibility. 3.You'd like your page loading times to be as optimal as possible. ØYour page loading times can have a significant impact on practically all aspects of your website. Slow pages can lead to low engagement metrics and high bounce rates. A dedicated server can help you to optimize this aspect of your website as much as possible. 4.You want to have control over every aspect of your server. ØThe final reason you may want to choose a dedicated server over other options is a simple one: control. We've alluded to this in previous sections, but dedicated hosting gives you complete responsibility over how you choose to use your server.

"from scratch"

: from the very beginning, especially without making use of or relying on any previous work for assistance. (Oxford Languages) : [making something] by starting from the beginning with the basic ingredients. (*Typically: bake something ~; do something ~; make something ~; Start (something) ~.) ØSo, to develop a website from scratch is to start with no resources pre-built, no existing site to enhance or no template at all.

Extend a Layout

@extends directive to specify which layout the child view should "inherit". The sidebar section is utilizing the @parent directive to append (rather than overwriting) content to the layout's sidebar. The @parent directive will be replaced by the content of the layout when the view is rendered. When this view is called, Laravel will look for the app blade file we just created. Replace @yield('title') with the title section and replace @yield('content') with the content section.

APIs vs Web Services

API is an interface that allows you to build on the data and functionality of another application, while a web service is a network-based resource that fulfills a specific task. Yes, there's overlap between the two: all web services are APIs, but not all APIs are web services. Both web services and APIs are — at their core — very useful and very much used today. Both are used for communication between apps web service/ is used to facilitate the interaction between machines over the network API/ is an interface between apps so that they can communicate with each other.

Required parameter

At times you had to work with a segment(s) of the URL (Uniform Resource Locator) in your project. Route parameters are encapsulated within {} (curly-braces) with alphabets inside. Let us take an example where you have to capture the customer's ID or employee from the generated URL.

Basic Controllers

Controllers can group related request handling logic into a single class. For example, a UserController class might handle all incoming requests related to users, including showing, creating, updating, and deleting users. By default, controllers are stored in the app/Http/Controllers directory.

Generating Model Classes

Define Models To get started, let's create an Eloquent model. Models typically live in the app\Models directory and extend the Illuminate\Database\Eloquent\Model class. You may use the make:model Artisan command to generate a new model:

Displaying Data

Display data that is passed to your Blade views by wrapping the variable in curly braces. For example, given the following route: You may display the contents of the name variable like so:

SOAP message consists of:

Each SOAP document needs to have a root element known as the <Envelope> element. The root element is the first element in an XML document. The "envelope" is in turn divided into 2 parts. The first is the header, and the next is the body. The header (optional)contains the routing data which is basically the information which tells the XML document to which client it needs to be sent to. The body will contain the actual message.

Flights and hotel booking online travel platform

Fetches flight data from different airlines databases using web services.

FileZilla

FileZilla is a free and open-source, cross-platform FTP application, consisting of FileZilla Client and FileZilla Server.

GitHub

GitHub, Inc. is a provider of Internet hosting for software development and version control using Git. It offers the distributed version control and source code management functionality of Git, plus its own features.

Creating Controller

Go to the terminal, type in: php artisan make:controller IndexController Go to app/Http/Controllers/, and you will find a IndexController.php Note that the controller extends the base controller class included with Laravel..

Understanding REST Headers

HTTP Headers are an important part of the API request and response as they represent the meta-data associated with the API request and response. Headers carry information for: 1.Request and Response Body 2.Request Authorization 3.Response Caching 4.Response Cookies

Create a model and corresponding a migration

If you would like to generate a database migration when you generate the model, you may use the --migration or -m option: Sample migration file created. This is where we define the structure of our database.

Blade Directives

In addition to template inheritance and displaying data, Blade also provides convenient shortcuts for common PHP control structures, such as conditional statements and loops. If Statements You may construct if statements using the @if, @elseif, @else, and @endif directives. These directives function identically to their PHP counterparts:

Route Parameter

In many cases, within your application, a situation arises when you had to capture the parameters send ahead through the URL. For using these passed parameters effectively, in Laravel, you have to change the routes.php code. Laravel provides two ways of capturing the passed parameter: ØRequired parameter ØOptional Parameter

Route can return a Controller

In web.php>>> use App\Http\Controllers\IndexController; This line of code means if the router receives "/user", Laravel will go to the UserController, and invoke the index method. Remember, this is the new syntax in Laravel 8, the old syntax will not work here!

Inserting & Updating Models

Inserts To insert a new record into the database, you should instantiate a new model instance and set attributes on the model. Then, call the save method on the model instance. Note that this is done in the Controller file.

Examples of Web Frameworks

Laravel (PHP) Laravel is a web application framework with expressive, elegant syntax. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects Django (Python) Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel. It's free and open source. Express (Node.js/JavaScript) Express is a fast, flexible and minimalist web framework for Node.js. (node is a browserless environment for running JavaScript). It provides a robust set of features for web and mobile applications and delivers useful HTTP utility methods and middleware. Spring Boot (Java) Spring Boot is one of a number of projects provided by Spring. It is a good starting point for doing server-side web development using Java.

What is Laravel?

Laravel Development is an open-source web application PHP framework created and developed by Taylor Otwell in August 2011 for web application development followed by the MVC Architectural pattern (model-view-controller). Incredibly well documented framework for Web Artisans. Ensure that it gives something unique and elegant features for everyone. Artisan is the command-line interface included with Laravel. It provides a number of helpful commands that can assist you while you build your application. This tool allows us to perform the majority of those repetitive and tedious programming tasks that most of the developers avoid performing manually

Laravel Migration

Laravel Migration is an essential feature in Laravel that allows you to create a table in your database. It allows you to modify and share the application's database schema. You can modify the table by adding a new column or deleting an existing column. Why do we need Laravel Migration? §Suppose we are working in a team, and some idea strikes that require the alteration in a table. In such a case, the SQL file needs to be passed around, and some team member has to import that file, but team member forgot to import the SQL file. §Laravel Migration allows you to add a new column or delete the records in your database without deleting the records that are already present.

Optional Parameter

Many parameters do not remain present within the URL, but the developers had to use them. Such parameters get indicated by a "?" (question mark sign) following the parameter's name.

Web application framework- Architecture

Most of the web frameworks depend on the MVC (Model-View-Controller) architecture. The reason why this pattern is preferred lies in its rational design that separates the app logic from the interface and forms the three essential parts that are represented in the architecture's name — MVC (Model-View-Controller).

Named Routes

Named routes is an important feature in the Laravel framework. It allows you to refer to the routes when generating URLs or redirects to the specific routes. In short, we can say that the naming route is the way of providing a nickname to the route. type the command php artisan route:list

PHP RESTful Web Service Example

Objective: To develop a web service that shares the details of available mobile phones to any online client request. The client can access the endpoints §To retrieve all the mobile phones details. §To retrieve one specific mobile phone details. §The web service can return JSON, XML and HTML response.

Examples of Libraries

Particles.js — A library for creating beautiful floating particles on a web page Three.js — A library for creating 3d objects and spaces on a web page Fullpage.js — Easy to implement full page scroll feature Typed.js — Typewriter effect Waypoints.js — Trigger a function when you scroll to an element Highlight.js — Syntax highlighting for the web Chart.js — Make beautiful charts using only javascript Animate.css — Animation library Flat UI Colors — List of simple and effective main colors

Pros and cons of dedicated server hosting

Pros: üHigh uptime percentage. üBetter performance. üMore reliability. üBetter security. üGreater flexibility. üUnlimited access. Cons: oIncreased cost. oNot recommended for small businesses or sites with low traffic. oRequires technical knowledge/experience, as you need to setup everything e.g. OS, processor, memory, software needed(Apache, PHP, MYSQL)

Restful Web Services

REST (Representational State Transfer.) ØRestful Web Services is a lightweight, maintainable, and scalable service that is built on the REST architecture.

Redirect() method

Redirect() method is used to navigate from one URL to another URL. This method provides a convenient or shortcut way to move from one URI to another URI. With the help of this method, you don't need to define the full route. There are two ways of using redirect() method:

Routing

Routing is one of the essential concepts in Laravel. Routing in Laravel allows you to route all your application requests to its appropriate controller. The main and primary routes in Laravel acknowledge and accept a URI (Uniform Resource Identifier) along with a closure, given that it should have to be a simple and expressive way of routing.

Difference Between SOAP vs. REST

SOAP makes use of only XML as its data transference format. This means that REST can use SOAP, but SOAP is unable to use REST. But the differences don't stop there in the REST vs. SOAP list.

Types of Web frameworks

Server-side Frameworks ØThe rules and architecture of the server-side frameworks permit you to create simple pages, landings and forms of different kinds. ØTo create a web application with a well-developed interface you need a wider range of functionality. Server-side frameworks handle HTTP requests, database control and management, URL mapping, etc. These frameworks can improve security and form the output data- simplifying the development process. Some of the top server-side frameworks are - oLaravel (PHP) oDjango (Python) oRuby on Rails (Ruby) oExpress (JavaScript/Node.JS) Ø landing page is a standalone web page, created specifically for a marketing or advertising campaign. It's where a visitor "lands" after they click on a link in an email, or ads from Google, Bing, YouTube, Facebook, Instagram, Twitter, or similar places on the web. Client-side Frameworks ØClient-side frameworks don't take care of the business logic like the server-side ones. ØThey function inside the browser. Therefore, you can enhance and implement new user interfaces. ØA number of animated features can be created with frontend and single page applications. ØEvery client-side framework varies in functionality and use. Here are some client-side frameworks for comparison's sake; all of whom use JavaScript as their programming language- oAngular oEmber.JS oVue.JS oReact.JS

Single Action Controllers

Single action controllers are useful when we only need one method in the controller class: class IndexController extends Controller { // public function __invoke() { return view('welcome'); } } Now we can change the route we just defined. Route::get('/',IndexController::class);

IOT using Web Services

Smart Car Smart House (e.g Self Closing windows according to the weather status) Alexa to read weather forecast or status

Connecting your Laravel project to MySQL database

Step1: Create a new database via phpMyAdmin oNavigate to domain PHPMyAdmin, Click on the Databases tab and create a new database with your database name. oClicking on create will create a new database in your XAMPP MySQL. Step2: Changes in.env configuration file oIn the next step, open .env file in the project folder and fill all details as shown below: (You need to put your own username and password for your XAMPP, if any)

examples of blade directives

Switch Statements & Loops

Controller in MVC Structure

The MVC structure means that the application is divided into three parts. The (M) model defines the data model, (V) view presents data and (C) controller defines logic and manipulates data.

Laravel Application Structure

The application structure is the structure of folders, sub-folders, and files available in the project. Once the project is created in Laravel, the application structure generated as shown in the screenshot:

Template Inheritance

The primary benefit of using the Blade template is that we do not need to write the same code over and over again. Try to create a folder in resources and named it layouts and add new file: app.blade.php The @section directive, as the name implies, defines a section of content, while the @yield directive is used to display the contents of a given section. @show will define and immediately yield the section

Create a model and corresponding a migration cont,

The public function up() creates a database table named generals, and the public function down() drops the database table named generals if it already exists.

DEDICATED VS. SHARED HOSTING

There are two types of hosting on hardware servers that cater to different business needs: dedicated hosting and shared hosting. qShared hosting means that multiple organizations host their business assets on the same server. Each party is given a limited amount of disk space and bandwidth. qDedicated hosting, on the other hand, means an organization has full and exclusive access to all of the storage space and bandwidth that the server can provide.

URI

Uniform Resource Identifier (URI) •is a compact sequence of characters that identifies an abstract or physical resource. •URI mapping is the process of matching a uniform resource locator (URL) to a resource (file) in the server filesystem.

Version Control Systems

What is Version Control System? ØA version control system allows users to keep track of the changes in software development projects and enable them to collaborate on those projects. Using it, the developers can work together on code and separate their tasks through branches. Benefits of Using a Version Control System üThe main advantages of using a version control system include streamlining the development process, management of code for multiple projects and keeping a history of all changes within a code. üA version control software saves all the changes in a repository. Hence, if the developers make a mistake, they can undo it. At the same time, they can compare the new code with a previous version(s) to resolve their grievance. This can reduce human errors and unintended consequences to a great extent. A great fit for any web development company around the globe.

Dedicated server

a type of Internet hosting in which the client leases an entire server not shared with anyone else

Web Services

are the types of internet software that uses standardized messaging protocol over the distributed environment.

Make the IndexController to return a view

class IndexController extends Controller { public function index() { return view('welcome'); } }

Cloud Web Hosting that you can try

cloud hosting is based on several interconnected servers spread over a wide geographical area. This allows you to spread your data across these widely distributed virtual servers (thus the name cloud) and serve your customers more efficiently. qMicrosoft Azure qAmazon AWS qGoogle Cloud Heroku

.htaccess

file is used for mapping the request URI to the REST service endpoint. We will learn more about it as we move along the example.

The strpos()

function finds the position of the first occurrence of a string inside another string. Returns the position of the first occurrence of a string inside another string, or FALSE if the string is not found. Note: String positions start at 0, and not 1.

Object-relational mapping (ORM)

is a programming technique in which a metadata descriptor is used to connect object code to a relational database. ... ORM converts data between type systems that are unable to coexist within relational databases and OOP languages

API

is an acronym for Application Programming Interface. It enables communications and data exchange between two separate software systems built using different programming languages.

Composer

is dependency manager for PHP which you can install on your web server.

getHttpStatusMessage()

method is used to get the HTTP status message to construct the response It contains the HTTP status code and message mapping array. By receiving the status code, it returns the appropriate header response message. If the invalid status code is passed to this function or no such code is found in the mapping array, then the "Invalid Server Error" will be returned in the response.

Available Column types

pic

Website

returns GUI based data

Web Service

returns data likeXML or JSON

Uber

uses Google Map API services

Examples of API Headers

§Authorization: Carries credentials containing the authentication information of the client for the resource being requested. §WWW-Authenticate: This is sent by the server if it needs a form of authentication before it can respond with the actual resource being requested. Often sent along with a response code of 401, which means 'unauthorized'. §Accept-Charset: This is a header which is set with the request and tells the server about which character sets are acceptable by the client. §Content-Type: Indicates the media type (text/html or text/JSON) of the response sent to the client by the server, this will help the client in processing the response body correctly. §Cache-Control: This is the cache policy defined by the server for this response, a cached response can be stored by the client and re-used till the time defined by the Cache-Control header.

Why Laravel?

§Most of the developers in this software world are bonded with a wide range of PHP Frameworks. §Each one of the frameworks offers some unique development possibilities to the developers. §And one of the best ones is that Laravel, an open-source PHP web application development which follows the MVC architecture pattern that helps to hire laravel developers to develop versatile web applications.

Features of Laravel

Ø Authentication Laravel contains an inbuilt authentication system, you only need to configure models, views, and controllers to make the application work. Laravel includes built-in authentication and session services which are typically accessed via the Auth and Session facades ØBlade Templates Blade is the simple, yet powerful templating engine that is included with Laravel. Unlike some PHP templating engines, Blade does not restrict you from using plain PHP code in your templates. In fact, all Blade templates are compiled into plain PHP code and cached until they are modified, meaning Blade adds essentially zero overhead to your application. a facade is a class that provides access to an object from the container. A PHP template engine is a way of outputting PHP in your HTML without using PHP syntax or PHP tags. It's supposed to be used by having a PHP class that will send your HTML the variables you want to display, and the HTML simply displays this data. Ø Eloquent ORM (Object-relational mapping) Laravel contains an inbuilt ORM with easy PHP Active Record implementation. An effective ORM allows the developers to query the database tables by using the simple PHP syntax without writing any SQL code. It provides easy integration between the developers and database tables by giving each of the tables with their corresponding models. ØMVC Architecture Support Laravel supports MVC architecture. It provides faster development process as in MVC; one programmer can work on the view while other is working on the controller to create the business logic for the web application. It provides multiple views for a model, and code duplication is also avoided as it separates the business logic from the presentation logic. ØSecure Migration System Laravel framework can expand the database without allowing the developers to put much effort every time to make changes, and the migration process of Laravel is very secure and full-proof. In the whole process, php code is used rather than SQL code. ØUnique Unit-testing Laravel provides a unique unit-testing. Laravel framework can run several test cases to check whether the changes harm the web app or not. In Laravel, developers can also write the test cases in their own code. ØIntact Security Application security is one of the most important factors in web application development. While developing an application, a programmer needs to take effective ways to secure the application. Laravel has an inbuilt web application security, i.e., it itself takes care of the security of an application. It uses "Bcrypt Hashing Algorithm" to generate the salted password means that the password is saved as an encrypted password in a database, not in the form of a plain text. ØLibraries and Modular Laravel is very popular as some Object-oriented libraries, and pre-installed libraries are added in this framework, these pre-installed libraries are not added in other php frameworks. One of the most popular libraries is an authentication library that contains some useful features such as password reset, monitoring active users, Bcrypt hashing, and CSRF protection. This framework is divided into several modules that follow the php principles allowing the developers to build responsive and modular apps. Cross site request forgery (CSRF), also known as XSRF, Sea Surf or Session Riding, is an attack vector that tricks a web browser into executing an unwanted action in an application to which a user is logged in Artisan Laravel framework provides a built-in tool for a command-line known as Artisan that performs the repetitive programming tasks that do not allow the php developers to perform manually. These artisans can also be used to create: ü skeleton code üdatabase structure, and their migration üIt also generates the MVC files through the command line üArtisan also allows the developers to create their own commands skeleton code a basic layout of a project without any actual data but more than a blank template.

What is Library?

ØA Library is a set of code that was previously written by a developer that you can call when you are building your project. ØIn simple words, a bunch of code packed together that can be used repeatedly is known as Library. jQuery jQuery is a JavaScript library that does the things like event handling and HTML document manipulation.

Create Routes in Laravel

ØAll Laravel routes are defined in your route files, which are located in the routes directory. ØThe routes/web.php file defines routes that are for your web interface. The general routing in Laravel for each of the possible request looks something like this:

Views (Blade Templates)

ØBlade is the simple, yet powerful templating engine that is included with Laravel. ØBlade templates are compiled into plain PHP code and cached until they are modified, meaning Blade adds essentially zero overhead to your application. ØBlade template files use the .blade.php file extension and are typically stored in the resources/views directory. ØBlade views may be returned from routes or controller using the global view helper.

Models

ØControllers are in charge of retrieving data from the database and that's where models come in. ØEach database table has a corresponding "Model", and that model will handle all the interactions with the table. Define Models The easiest way to create a model instance is using the make:model Artisan command:

Advantages of RESTful Web Services

ØFast: RESTful Web Services are fast because there is no strict specification like SOAP. It consumes less bandwidth and resource. ØLanguage and Platform independent: RESTful web services can be written in any programming language and executed in any platform. ØCan use SOAP: RESTful web services can use SOAP web services as the implementation. ØPermits different data format: RESTful web service permits different data format such as Plain Text, HTML, XML and JSON.

What is a web framework?

ØFramework is a collections of tools designed to help create your project, so you do not need to start from scratch. ØA framework is software development that is designed to support the development of dynamic- websites, web-applications and web-services. Ø ØIt is a set of prewritten code or libraries which provide functionality common to a whole class of applications. The framework can be seen as a base or a skeleton to build upon.

Git

ØGit is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. ØGit is software for tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows.

Framework vs Library

ØMany people use these two words interchangeably without knowing the profound meaning behind them. ØBoth Library and Framework are code written by some developer to solve a complicated problem efficiently. ØThey both give you an excellent approach to write DRY (don't repeat yourself) code. ØTheir purpose was to increase the reusability of the code so that you can use the same piece of code or functions again in your various project.

RESTful Key Elements

ØREST Web services have really come a long way since its inception. In 2002, the Web consortium had released the definition of WSDL and SOAP web services. This formed the standard of how web services are implemented. ØIn 2004, the web consortium also released the definition of an additional standard called RESTful. ØOver the past couple of years, this standard has become quite popular and is being used by many of the popular websites around the world which include Facebook and Twitter.

Some Important Tools in Deploying Web Services in Dedicated Server

ØSecure Shell (SSH) ØPUTTY ØRemote Desktop Protocol (RDP) ØFILEZILLA ØGit (Distributed Version Control)

Disadvantages of Soap Web Services

ØSlow: SOAP uses XML format that must be parsed to be read. It defines many standards that must be followed while developing the SOAP applications. So it is slow and consumes more bandwidth and resource. ØWSDL dependent: SOAP uses WSDL and doesn't have any other mechanism to discover the service.

Why do we use Frameworks?

ØSoftware frameworks make life easier for developers by allowing them to take control of the entire software development process, or most of it, from a single platform. ØVirtually all web applications have a common set of basic requirements, such as user management e.g., secure user login, password recovery), group management, and access authorization. ØA Web Application Framework usually includes all these functionalities, refined through hundreds of production deployments, freeing developers to focus on the needs of their specific application.

Some Basic Git Commands

ØThe git init command is usually the first command you'd run in any new project that is not already a Git repository (also commonly called repo). ◦ cd into the directory you want to initialize. §Then, run this command. $ git init §This will transform the current directory into a Git repository ØThe git clone command is used to download the source code from a remote repository (like GitHub, Bitbucket, or GitLab). $ git clone <https://url-of-the-repository> §When you clone a repo, the code is automatically downloaded to your local machine. §As a convenience, the downloaded version is linked to the origin (the repository from where you downloaded). But sometimes, people wouldn't want to have this link. If your use case is similar, run: $ git remote rm origin §This will disassociate the downloaded current repository from the origin. Ø Git Add is used every time you create a new file, delete it, or make a change, you'll have to tell Git to track it and add it to the staging area. Otherwise, the files you made changes to wouldn't be added when you try to push your changes. $ git add <file-name> §This command will add only a single file to your next commit. If you want to add all the files to which changes were made, you can use ($git add .) or $ git add -A §It's important to remember that using git add will not make any changes in the remote repository. Your changes will be recorded only when you commit them. ØGit Commit command like a checkpoint in your development process. It's commonly used to save your changes. Maybe after completing a specific work item assigned in your agile tool. $ git commit -am "<<commit-message>" Note: The git commit command saves the changes only in your local repository. It does not push to the remote origin and make your changes accessible for others to collaborate. Ø Git Push to make all your committed changes available to your teammates, you'll have to push them to the remote origin. $ git push <remote> <branch-name> §It's important to remember that git push command will upload only the changes you've committed. ØGit Pull command allows you to fetch all the changes that your teammates pushed and automatically merge them into your local repo. $ git pull <remote> ØGit Status when you're feeling a bit lost with what's happened in your repo (yes, it can happen) the Git Status command can tell you all the information you'll need to know. $ git status

Disadvantage of using a framework

ØTo be able to use the framework at its best, it often requires significant education and experience. ØPerformance might be suffering from common code that is built to handle as much as possible, and is not optimized for a specific task ØIf a bug or a security risk in the framework is found it will be in all applications using the framework. Some framework are very stiff and do not give the developer enough flexibility needed for some applications. ØBuilding from scratch often gives a feeling of more productive which can make the developer more peaceful and less feeling of being stuck and thereby more creative and less bored.

PuTTY

ØTo establish an SSH connection, you will need an SSH client app like PuTTY. ØPuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open-source software that is available with source code and is developed and supported by a group of volunteers.

Here are the important reasons of using URI

ØURI allows new file types to be defined without affecting old files you have. ØA Uniform Resource Identifier is essential to the semantic web because it prevents ambiguity. ØA URI search the name as well as the location of a resource or file, which is in a uniform format. ØIt has a string of characters for the specific filename and path. ØURI provides a method for resources to be accessed by other systems over the World Wide Web or across a network. It is used by web browsers and P2P (Peer to Peer) file-sharing software to find and download files. You can assign a single resource to associate with multiple representations.

Advantages of Soap Web Services

ØWS Security: SOAP defines its own security known as WS Security. ØLanguage and Platform independent: SOAP web services can be written in any programming language and executed in any platform.

Web applications

ØWeb applications have evolved at a rate that the usability and interactivity they provide rival that of a native application. ØThe technology and the expertise needed to build tailored solutions that reach this level of proficiency is demanding. ØThankfully, there are tools that make web application development easier, one of them being a web app framework.

Regular Expression Constraints

ØYou may constrain the format of your route parameters using the where method on a route instance. Ø The where method accepts the name of the parameter and a regular expression defining how the parameter should be constrained:

Advantages of using a software framework:

üAssists in establishing better programming practices and fitting use of design patterns üCleaner code üCode is more secure üDuplicate and redundant code can be avoided üHelps consistent developing code with fewer bugs üMakes it easier to work on sophisticated technologies üSeveral code segments and functionalities are pre-built and pre-tested. This makes applications more reliable üTesting and debugging the code is a lot easier and can be done even by developers who do not own the code üThe time required to develop an application is reduced significantly

Information needed in using PuTTY

üServer IP Address üSSH port üSSH username üSSH password

directories

•App: This directory is the meat of the application and contains the core code. •Console: This directory contains all the custom Artisan commands created using make:command •Exceptions: This directory contains the application's exception handler and is a good place to add custom exception classes to handle different exceptions thrown by your application •Http: This directory contains all your controllers, middleware and requests •Models This is a new director added since Laravel 8 to hold Model files. Earlier, models were stored at App folder, but now it can be stored inside App/Models folders too. •Providers: This directory contains all your service providers for the application. You can know more about service providers here Service providers are the central place of all Laravel application bootstrapping. Your own application, as well as all of Laravel's core services, are bootstrapped via service providers. But, what do we mean by "bootstrapped"? In general, we mean registering things, including registering service container bindings, event listeners, middleware, and even routes. Service providers are the central place to configure your application. •Bootstrap: This directory contains framework bootstrap as well as configuration files. It also contains Cache directory which contains framework generated cache files •Config: This directory contains all your application's configuration files. •Database: This directory contains all database migrations and seeds. You can also store SQLite database file here •Public: This directory contains assets like images, js files and CSS. •Resources: This directory contains all view files and CSS or LESS or SASS files. It also contains lang directory to store language files. •Routes: This directory contains all routes definitions for the application. php is the file which receives all the requests to your application and here you can redirect the requests to their respective controller methods. •Storage: This directory contains blade templates, session files, cache files and other. •Tests: This directory contains all the test files •Vendor: This directory contains all composer dependencies

What should you know prior to using the Laravel?

•HTML/CSS/Javascript •Basic understanding of core PHP •Intermediate PHP - This is sort of optional but if you have time, do learn some intermediate concepts like PHP OOP, abstraction etc. •Basic Understanding of MVC Framework •MySql

Factors to consider in Dedicated Server

•How powerful do you need your processor to be? In general, the more resources your site will need for features like custom applications or video-transcoding, the more powerful your processor should be. •How much bandwidth do you need? If you anticipate a huge volume of traffic on a regular basis or you plan to use HD pictures or streaming multimedia files, you'll need more bandwidth. •How much memory do you need? Even if you don't require a huge amount of memory for what you're currently doing with your website, you really can't have too much. In a nutshell, having more RAM helps your site load faster (and speed is always a good thing). •Do you need a specific operating system? Many website owners don't really care either way, but if you have a strong preference for either Windows or Linux, know that each one requires a different OS. You will also need a Windows dedicated server if you plan on hosting Microsoft IIS, MS, SQL, or ASP.NET.

MVC(Model-View-Controller)

•Models represents the entities in database and helps you to query the database and return the data •Views are the pages which will be displayed when accessed the app. View Component is used for the User Interface of the application. •Controllers handle user requests, gets required data from the models and pass them to the Views. Controllers acts as an intermediary between Model and View Components to process the business logic and incoming request.

Remote Desktop Protocol (RDP)

•Remote Desktop Protocol (RDP) is a protocol developed by Microsoft. It is used to control and manage machines with a Windows operating system remotely. •Unlike Secure Shell, connections established using an RDP client provide a user with a graphical interface through which they can gain access to a remote computer and control it in the same manner as their local computer. Warning Alert! ØUsing Remote Desktop services, formerly known as terminal services, allows network and system engineers to easily manipulate remote computers connected to a local network or the Internet. ØThis comes with a price. If you do not use a virtual private network (VPN), connecting via RDP is far less secure than SSH because you are directly exposed to the internet.

Secure Shell (SSH)

•SSH is a secure protocol used as the primary means of connecting to Linux servers remotely. •It provides a text-based interface by spawning a remote shell. •After connecting, all commands you type in your local terminal are sent to the remote server and executed there.


Kaugnay na mga set ng pag-aaral

BIO 215 Exam 2 CH. 3, 8, 15-17, 18, 21

View Set

Chapter 6: Software Development Security

View Set