Web Development 101 – ODIN Project – 3

odinAdditional Important Topics

This section has a series of short lessons that will introduce you to a variety of essential supporting technologies for your journey into web development.


 Step 1: Git Basics

Git is the version control system used by developers.

Points to Ponder

Look through these now and then use them to test yourself after doing the tasks

  • What is Git?
  • What is SCM?
  • What is a VCS?
  • Why is Git useful for a developer?
  • Why is Git useful for a team of developers?
  • How do you create a new Git repository for a project locally?
  • How do you create it on Github?
  • How do you commit changes?
  • What is the difference between staging and committing changes?
  • What is the difference between committing your changes and pushing them to Github?
  • How do you check the status of your current repo in git?
  • How do you see the history of your previous commits (from the command line)?
  • How can you look through your historical commits on the Github website?
  • What is a “Merge”?
  • What is a “Pull Request”?
  • What is “Forking” a repo?
  • What is “Cloning” a repo?

Tasks

1. Watch the following YouTube videos from Github’s YouTube channel GitHub Training & Guides (https://www.youtube.com/user/GitHubGuides)

https://www.youtube.com/watch?v=8oRjP8yj2Wo

Published on 4 July 2013
A meaningful discussion of the value of Git begins with a solid understanding of what version control is and what it does for software developers, document authors, and designers.

https://www.youtube.com/watch?v=uhtzxPU7Bz0

Published on 4 July 2013
With the basics concepts of version control discussed in Episode 1, we continue with a discussion on the specific Git implementation of versioning. The complexities of simultaneous team member activities and Git’s handling of that scenario are diagrammed. The terminology and syntax of merging with Git is shown at the command line.

https://www.youtube.com/watch?v=wmnSyrRBKTw

Published on 4 July 2013
The concepts of Git have been established in the previous two episodes. We can now explore the location to download Git distributions, Git configuration, and basic use of the tool at the command line.
2. Watch the YouTube video Webcast • The Basics of Git and GitHub • July 2013 (https://www.youtube.com/watch?v=U8GBXvdmHT4) will provide more of a linear and holistic look at practical workflows when using Git.  You’ll also see information about some helpful Help files and GUI tools to visualize Git.

https://www.youtube.com/watch?v=U8GBXvdmHT4

Published on 4 July 2013
Check out the December 2013 edition of this webinar too: http://youtu.be/u6G3fbmpWr8
Are you new to Git and GitHub? Would you like to learn the basics but haven’t taken the time to read the GitHub Help pages yet? Sit back and watch this 50 minute course entitled “The Basics of Git & GitHub,” recorded from a live webinar with Matthew McCullough of GitHub:Training and with chat commentary from Brent Beer. This class assists students in using Git from the command line and offers a quick glimpse of the GitHub for Windows and GitHub for Mac GUIs. It offers GitHub newcomers a tour of what this feature-loaded version control tool and an equally powerful web application can do for developers, designers, and managers in both the open source and commercial software worlds.

3. Do the Git Calisthenics (http://www.vikingcodeschool.com/web-development-basics/git-calisthenics) exercises for a follow-along walkthrough of everything you’ll need with Git.

4. Do the Code School’s TryGit exercises (https://try.github.io/levels/1/challenges/1)


Additional Resources

  • Watch the YouTube video Quick Wins with Git (Git-SCM) • Git Basics #4 (https://www.youtube.com/watch?v=7w5Z7LmyLgI) which will get a bit more into some of the features of Git. A bit abstract, but should give you some conceptual tips.

https://www.youtube.com/watch?v=7w5Z7LmyLgI

Published on 4 July 2013
Some distributed version control explorers are Git users that have just dabbled with the tool or decision makers that could benefit from a quick semi-technical review. In this screencast, eight of the many differentiating features of Git are listed, explained, and discussed.
  • Git Immersion is a practical guided tour that walks through the fundamentals of Git, inspired by the premise that to know a thing is to do it (http://gitimmersion.com/index.html).
  • explainshell.com (http://explainshell.com/). Interactive search that explains the meaning of any shell command, including git commands

Step 2: The Cloud, Hosting, and Software as a Service (SAAS)

You’ve almost certainly heard of the Cloud before and have maybe also heard of SAAS. The Cloud is really just a way of saying “stored out on the Internet somewhere”, which really means “stored on someone else’s systems that they let us access using the Internet”. With more and more of the world in possession of 24/7 internet access, that’s not necessarily a bad thing. For software, it has been a great thing.


Hosting in the Cloud

Not too long ago, you had to buy a machine, set it up to run your back end code, and plug it into the wall to get it onto the internet. These days, not only can you host your personal songs and files and emails in the Cloud, but you can actually run your website from servers hosted by someone else (and maybe in another country too). Companies (like Heroku (https://www.heroku.com/) or Amazon Web Services (AWS) (https://aws.amazon.com/) make it so that all you have to do is push some code their way and they’ll take care of firing up and maintaining the servers necessary to get that application “live” and online.

They will also guarantee a certain minimum level of up-time (usually over 99%) so you don’t have to worry about whether your servers have failed. It means that you as a developer can focus more on building cool applications and less on the nuts and bolts of getting them out there.


Software as a Service

Where before you had to write a piece of software that would work on a particular type of computer (ie. Windows machines running Windows Vista) and then get that user to install the software, now many of these applications are run completely using websites. Think about Google Spreadsheets or Evernote or TurboTax… all of these can be run completely online (though they often have accompanying downloadable applications to help you out).

The ability to create this Software as a Service (SAAS) gives you tons of great flexibility as a developer. It means you no longer have to think about the dozens of different types of operating systems and versions that the users could be using. You just make sure your application can be viewed properly by people using a few different web browsers.

Even better, when you inevitably want to make large-scale changes or just fix some bugs, you no longer have to convince your users to go through the painful upgrade process. Just push the changes to your server, and Presto!, your application is updated and good to go.

Points to Ponder

Look through these now and then use them to test yourself after doing the tasks

  • What is SAAS?
  • What is Cloud Computing?
  • What does it mean to host your application in the cloud?
  • What primary factors have made cloud computing possible?
  • What are the advantages of hosting your app in the cloud versus deploying to your own server?
  • What are the disadvantages of cloud hosting vs self hosting?

Tasks

1. Read The Beginner’s Guide to the Cloud (http://mashable.com/2013/08/26/what-is-the-cloud/#XN7gNq_hfkqU)

2. Read CNBC’s Cloud Computing 101: Learning the Basics (http://www.cnbc.com/id/43077233)

3. Watch the YouTube video CS 169 – Software as a Service – Lecture 2 (https://www.youtube.com/watch?v=SeBAj4P2FWA&list=PLjbL0BCR04Q3uDPD3GVZJqV3UnJkOic-o) specifically David Patterson’s explanation of Cloud Computing (12:23 to 30:00) from the Berkeley SAAS course on edX.

https://www.youtube.com/watch?v=SeBAj4P2FWA&list=PLjbL0BCR04Q3uDPD3GVZJqV3UnJkOic-o

Published on 12 September 2012
Lecture 2 – 08/29/2012 – Computer Science 169
Software as a Service

Additional Resources


Step 3: Security, SSL, and Best Practices

A brief introduction to security concepts and best practices.

It’s important to at least start thinking about how the open and bountiful world of the Internet handles issues of security and secure connections.

Security is something that beginning developers don’t spend a lot of time thinking about because they’ve got a lot on their minds but it will occupy more of your time as you start putting real applications onto the internet. It’s something that you need to be familiar with because sometimes simple but incorrect choices can leave your users’ data exposed or your application vulnerable to attack. Some simple best-practices and best technologies go a long way towards alleviating those issues.

There are a couple of basic areas where security is particularly important – authenticating users, creating secure connections and securing your databases. Luckily, the tools we’ll be learning have worked out good solutions to most of these problems.

SSL is a type of certificate used to make sure the contents of a packet / note don’t get read. It’s like putting your note in a lock-box and you’ve given the receiver the key ahead of time. He’s the only one who can see what’s in the box, because he has the key (the SSL certificate). HTTPS is an altered version of the HTTP protocol which makes sure whoever tries to open the box has the key. If anyone tries to read the note and they don’t have the key, all they’ll see is garbled (encrypted) data, which will most likely just look like random characters. it’s like they took the box and just tried smashing it on the floor, but it ripped the note apart in the process.

You’ll do some brief reading/viewing here but the main theme is that Security is an important issue, even if it’s often obscured from you. You’ll run into use of certificates when you deploy to Heroku and possibly also when you’re setting up your Github account (though that depends which method for pushing you’ve enabled).

Points to Ponder

Look through these now and then use them to test yourself after doing the tasks

  • Why is security for an application important?
  • What are the major areas where a web application is vulnerable?
  • How is HTTPS different from HTTP?
  • What does SSL stand for?
  • What is an SSL certificate?
  • How long has it been since you saw a news headline of a tech company who got “hacked” and exposed millions of user accounts?

Tasks

1. Watch the YouTube video How SSL works tutorial – with HTTPS example (https://www.youtube.com/watch?v=iQsKdtjwtYI). It’s more important to understand the “Why use SSL” than the “How to use SSL”. The section on Certificates at the end is also useful.

 Uploaded on 6 August 2010
How SSL works by leadingcoder. This is a full tutorial how to setup SSL that requires client certificate for reference: http://www.windowsecurity.com/articles-tutorials/web_server_security/Client-Certificate-Authentication-IIS6.html
2. Read Beginner’s Guide To Website SSL Certs (http://www.hongkiat.com/blog/ssl-certs-guide/)
3. Read Smashing Magazine’s Common Security Mistakes in Web Applications (http://www.smashingmagazine.com/2010/10/common-security-mistakes-in-web-applications/) from a 2010 article. It references PHP code but the vulnerabilities are language agnostic.

Additional Resources


Step 4: FTP Basics

A very brief look at the File Transfer Protocol which is often used to upload files to your web server.

FTP stands for File Transfer Protocol and is basically a way of transferring files to and from servers. Depending on your workflow, you may or may not use it directly but you should know what it is.

Points to Ponder

Look through these now and then use them to test yourself after doing the tasks

  • What is FTP?
  • When is FTP used?
  • How is FTP used?

Task

1. Read Webmonkey’s FTP for Beginners (http://www.webmonkey.com/2010/02/ftp_for_beginners/)


Additional Resources


Tying it All Together

Now that you’ve had a healthy taste of all the major components in a web application, we’ll take a step back and remember where they all fit into the bigger picture.

Step 1: How are Websites Built in the Real World?

A look at the macro level workflow from the client to the developer and then a closer look at what exactly the developer does.

You’ve spent a lot of time learning all the component pieces of a web application. In the Rails project, you were able to actually build one.

You will be building applications either for yourself or someone else, and in either case that application will be part of a greater project with some sort of user-focused goal, ie. what does it enable the user to do? So it should be pretty obvious that the application is just a part of a larger whole, and in the real world you’ll be interacting with multiple people during the process of its creation.

We’ve mentioned that Rails lets you develop applications very quickly and have used the term Agile Development, but now you’ll get a chance to take a deeper look at that term and what it means. You’ll also zoom out even more and start thinking for a bit about the ecosystem of the companies that are having applications built.

Maybe that’s directly relevant to the startup you’re hoping to build or maybe it will be representative of the client you serve while you’re building up your skill-sets. Either way, understanding why you’re building what you’re building is an important piece of context that can’t be understated.

Points to Ponder

Look through these now and then use them to test yourself after doing the tasks

  • What are the major components of a Rails application?
  • What is Waterfall Development?
  • What is Waterfall good for?
  • What is Agile Development?
  • What is Agile good for?
  • Why does testing fit well into an Agile methodology?
  • What does DRY mean?
  • What is a user “Role”?
  • What is a “User Story”?
  • What’s the difference between a “Feature” and a story?
  • At what stage of a startup should you start building your web app?
  • What members of a team typically work together to produce a web application?

Tasks

1. Read Learning Rails: Anatomy of a Web Application (http://www.buildingwebapps.com/transcript/79327-anatomy-of-a-web-application). This will refresh your understanding of the web application itself. (You can listen to audio of it by clicking the link on the left side). Pay particular attention to what’s happening on the client vs the server side. It gets a bit more into the guts of what Rails is doing, and this will be valuable for understanding what you’ll be building later on.

2. Watch the YouTube video CS 169 – Software as a Service – Lecture 1 (https://www.youtube.com/watch?v=Fr-B4xHZRzY&list=PLuCVssMJ_UI1DneCzaU7BpAy94CvQQgGq&index=1). Get a bigger picture of software development methodologies by starting at minute 36 of this Berkeley SAAS course video lecture. You’ll also get a perspective of how and why Rails fits well into Agile methodologies.

https://www.youtube.com/watch?v=Fr-B4xHZRzY&list=PLuCVssMJ_UI1DneCzaU7BpAy94CvQQgGq&index=1

Published on 12 September 2012
Lecture 1 – 08/27/2012 – Computer Science 169
Software as a Service

3. Read Lee Edward’s answer to Quora’s What’s an efficient web app development process? (https://www.quora.com/Whats-an-efficient-web-app-development-process) to get better acquainted with the actual flow of app production. He is a developer at Pivotal Labs, which uses Agile Development methodologies.

4. Think about the startups and companies that are building web applications by reading through the ThoughtBot Playbook (http://playbook.thoughtbot.com/), an online playbook for how to build a product.


Additional Resources


Step 2: Principles of Good Programming

A look at some of the guiding principles of being a good programmer.

There are a handful of generally accepted principles of good programming. Common expressions like “be lazy” and “don’t repeat yourself” go a long way.

If you stick with them, they’ll keep you out of trouble. Print the list from the first post below if you need to. This is a great resource to check back with once you’re writing code more consistently.

Points to Ponder

Look through these now and then use them to test yourself after doing the tasks

  • What does DRY stand for and why is it relevant to you?
  • What does KISS stand for and why do engineers love it?
  • How does MVC follow Separation of Concerns?
  • How “Don’t Make Me Think” is applicable to far more than just writing code — especially in user-facing experience and design functions.
  • What is “You ain’t gonna need it?” (YAGNI)
  • How Embrace Change is fundamental to the engineer’s career.
  • TETO – test early, test often

Tasks

1. Read Some Principles of Web Development (https://www.42lines.net/2011/10/13/some-principles-of-web-development/)  and take it to heart!

2. Read the post Christopher Diggins The Principles of Good Programming (http://www.artima.com/weblogs/viewpost.jsp?thread=331531)


Additional Resources