Slide 1

Slide 1 text

High level overview of concepts Lemİ Orhan Ergİn Principal software Engineer @ Sony guide for non-developers Fundamentals of web development

Slide 2

Slide 2 text

The aim of this training is to let you •Know some advanced concepts of web and web development •Understand how people develop web based software •Understand the technical discussions better •And answer your questions... For introductory information about web concepts, please check the slides of “Fundamentals of Web for Non-Developers”.

Slide 3

Slide 3 text

agenda •Web Development Concepts Web Applications, Web Services, Url Rewriting, Development/Deployment

Slide 4

Slide 4 text

Web Applications and the evolution of web sites to web applications

Slide 5

Slide 5 text

Static web pages ruled the world. We loved them and let DotCom bubble blow. Evolution of web Static web pages

Slide 6

Slide 6 text

Interactive web sites let the users communicate with the sites by entering content Evolution of web Interactive web sites

Slide 7

Slide 7 text

Reactive web applications both interact with the user and adapt itself by the needs of resolution and screen size Reactive web sites Evolution of web

Slide 8

Slide 8 text

Web APplications A web application is an application that is accessed by users over a network such as the internet or an intranet. It could be web sites, messaging platforms, search engines, web services, etc. •Presentation Oriented •Service Oriented •Client Side •Server Side There exists similar but two types of defining web application types

Slide 9

Slide 9 text

Controller Business Data Access Presentation request Response http://www.sony.co.uk For web pages, content is visualized by images, styles and scripts Data Sources Accepts all the requests and user inputs Content is prepared by running some business logic. All logic are coded by programming languages. Knows how to access data from data sources Databases, files, remote data services, other components could be your datasource Web APplications Requests contain a uri, headers and a message body Responses are the content to be rendered by browsers

Slide 10

Slide 10 text

Controller Business Data Access Presentation request Response http://www.sony.co.uk Data Sources Web APplications Designers, UX teams, Front-end developers prepare the presentation of web applications Developers code and develop software Business Analysts gather requirements and define open points Testers check if the requirements are developed as business requests Customers check if what they requested is implemented properly

Slide 11

Slide 11 text

Web Services or simply saying, the web components serving data to the requesters Web Services RESTful Web Services Simple Object Access Protocol (SOAP) Service Oriented Architecture (SOA)

Slide 12

Slide 12 text

web services Web services are services for doing specific functionalities that are made available from a business's Web server for Web users or other Web-connected programs. 1. REST-Compliant Web services, in which the primary purpose of the service is to manipulate XML representations of Web resources using a uniform set of "stateless" operations 2. Arbitrary Web services, in which the service may expose an arbitrary set of operations

Slide 13

Slide 13 text

To design a website you need to know about HTTP, XHTML, and URIs. A uniform resource identifier (URI) is a string of characters used to identify a name or a web resource, such as a web page or special set of data (like product data or user information). “/product/45242366” is a URI identifying a specific product. web services XHTML could be defined as HTML in valid XML structure.

Slide 14

Slide 14 text

To design a web application you need to know about HTTP, XHTML, and URIs. web services

Slide 15

Slide 15 text

To design a web service you need to know about XML, SOAP, WSDL, UDDI, WS- Policy, WS-Security, WS-Eventing, WS-Reliability, WS-Coordination, WS- Transaction, WS-Notification, WS-BaseNotification, WS-Topics, WS-Transfer... What?... web services

Slide 16

Slide 16 text

WEB It is most successful distributed platform in the world it's simple enough for average humans to understand Why not using HTTP and URIs for web services?

Slide 17

Slide 17 text

REST Representational State Transfer (REST) is a style of software architecture for distributed systems such as the World Wide Web Client-Server Stateless Cacheable Layered System Uniform Interface Services and applications conforming these constraints are “RESTful”

Slide 18

Slide 18 text

Restful web services GET /product/12 12 9 4 3 7 6 POST /product/4 with “data” data Create datad PUT /product/3 with “data” Update data DELETE /product/7 Delete Retrieve RESTful Web Services use HTTP methods explicitly, do not store any state, expose directory structure-like URIs and transfer data in XML, XHTML, JSON format

Slide 19

Slide 19 text

soap Simple Object Access Protocol (SOAP) is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks. It relies on XML Information Set for its message format, and usually relies on other Application Layer protocols, most notably Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission.

Slide 20

Slide 20 text

Service oriented architecture SOA is a software design and architecture based on having independent modules communicating between each other through services to build monitorable, scalable, reusable, stateless, loosely coupled components and platforms.

Slide 21

Slide 21 text

Jeff Bezos 1. All teams will expose their data and functionality through service interfaces. 2. Teams must communicate with each other through these interfaces. 3. There will be no other form of interprocess communication allowed. 4. It doesn’t matter what technology they use. 5. All service interfaces, without exception, must be designed from the ground up to be externalizable. No exceptions. 6. Anyone who doesn’t do this will be fired. 7. Thank you, have a nice day! Founder and CEO of Amazon Jeff Bezos sent an email to his colleagues having these words: https://plus.google.com/112678702228711889851/posts/eVeouesvaVX

Slide 22

Slide 22 text

URL Rewriting What you call is not what you really call

Slide 23

Slide 23 text

URL rewriting With URL rewriting, the URL and the resource that it leads to can be completely independent of each other. In practice, they’re usually not wholly independent: the URL usually contains some code or number or name that enables the application to look up the resource. But in theory, this is what URL rewriting provides: a complete separation. URL rewriting basically tells the Web server that the called url should show the Web page at an internal url without the customer or search engine knowing about it. /products/miniflow-gutter-brown/11577676 /diy/jsp/bq/nav.jsp?action=detail&fh_secondid=11577676

Slide 24

Slide 24 text

URL rewriting User Web Server Application Server is called by the user. Web Server gets the request, runs ReWrite Rules and convert the url into a different one. /products/miniflow-gutter-brown/11577676 /diy/jsp/bq/nav.jsp?action=detail&fh_secondid=11577676 is received by the application server. Request is processed and a response is generated and sent. is the url that the user sees the response. Even though URL has changed internally, the user is not aware of it. /products/miniflow-gutter-brown/11577676

Slide 25

Slide 25 text

How do developers develop software ? * The way of development differs from company to company and team to team for sure. But here, we try to focus on enterprise level projects which are developed by teams. You may encounter different styles in other companies as well. *

Slide 26

Slide 26 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Developer Developer Developer LOCAL Developer Continous Integration Repository Manager At the very beginning, developers develop software by their own. No collaboration. That might be fine for some circumstances but it is unacceptable in an enterprise. Continuous Delivery

Slide 27

Slide 27 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Developer Developer Developer LOCAL Developer Continous Integration Repository Manager Developers We build cross functional teams that the members collaborate and develop as teams. Continuous Delivery

Slide 28

Slide 28 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Developer Developer Developer LOCAL Developer Continous Integration Repository Manager Developers Developers push code to a central version system. That helps developers work on same code at the same time. Continuous Delivery

Slide 29

Slide 29 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Continuous Delivery Developer Developer Developer LOCAL Developer Continuous Integration Repository Manager Developers Automated tests are written by developers. Continuous integration server builds all tests to get immediate feedback. Whenever a test fails, developers get notified by notification mails or messages.

Slide 30

Slide 30 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Continuous Delivery Developer Developer Developer LOCAL Developer Continuous Integration Repository Manager Developers CI server deploys snapshots to a centralized repository manager if all the tests pass. All packages including 3rd party packages are managed by the repository manager.

Slide 31

Slide 31 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Continuous Delivery Developer Developer Developer LOCAL Developer Continuous Integration Repository Manager Developers Now it’s time to deploy our code to servers and make it run. You could have several enterprise environments to deploy and run software for special purposes Your code is in repository manager as a package if packages are deployed as in Java based applications. Your code is in version control system and could be deployed to servers in text form like in Ruby and PHP.

Slide 32

Slide 32 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Continuous Delivery Developer Developer Developer LOCAL Developer Continuous Integration Repository Manager Developers Developers develop software, run and test in their local machines

Slide 33

Slide 33 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Continuous Delivery Developer Developer Developer LOCAL Developer Continuous Integration Repository Manager Developers Developers test their software in a separate environment before sending to Quality Assurance team

Slide 34

Slide 34 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Continuous Delivery Developer Developer Developer LOCAL Developer Continuous Integration Repository Manager Developers Test/QA machines should be similar to production machines in means of hardware to make tests more reliable. There might be more than one test environment for testing different features.

Slide 35

Slide 35 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Continuous Delivery Developer Developer Developer LOCAL Developer Continuous Integration Repository Manager Developers Staging is the place where customers do UAT, SIT and regression tests. The data is previewed before being delivered to production environment.

Slide 36

Slide 36 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Continuous Delivery Developer Developer Developer LOCAL Developer Continuous Integration Repository Manager Developers Only super users can deploy to production. Production environment is monitored continuously.

Slide 37

Slide 37 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Continuous Delivery Developer Developer Developer LOCAL Developer Continuous Integration Repository Manager Developers Too much manual effort for deployment. That slows down the whole testing and release process. Let’s automate deployments!

Slide 38

Slide 38 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Continuous Delivery Developer Developer Developer LOCAL Developer Continuous Integration Repository Manager Developers Packages are deployed automatically by a continuous delivery system to servers. Most of the time, continuous integration servers do the deployment.

Slide 39

Slide 39 text

Notification Services (email, messaging) Super User DEV TEST & QA STAGING PROD Version Control System Continuous Delivery Developer Developer Developer LOCAL Developer Continuous Integration Repository Manager Developers It is also possible to deploy code directly from version control system to servers. For instance, whenever developers push a code to version control system, the code could be deployed to development servers.

Slide 40

Slide 40 text

Notification Services (email, messaging) DevOps Version Control System Continuous Delivery DevOps DevOps DevOps LOCAL DevOps Continuous Integration Repository Manager Developers You don't need servers to maintain, you need just a cloud. DevOps are the ones who manages both infrastructural and development requirements. Version Control System This flow is the one we use for Heroku (i.e. cloud platform as a service) for deploying and running the software. Please note that each cloud solution has its own way of deploying software.

Slide 41

Slide 41 text

References RESTful Web Services http://www.crummy.com/writing/RESTful-Web-Services/ http://www.ibm.com/developerworks/webservices/library/ws-restful/ Web Services http://searchsoa.techtarget.com/definition/Web-services Url ReWriting http://coding.smashingmagazine.com/2011/11/02/introduction-to-url-rewriting/

Slide 42

Slide 42 text

Lemİ orhan ergİn [email protected] @lemiorhan @lemiorhan agilistanbul.com @lemiorhan LINKEDIN TWITTER SLIDESHARE BLOGGER Principal Software Engineer @ Sony Founder & Author @ agilistanbul.com flyingtomoon.com