3

Currently I am interning at a company as a "full stack" developer (Application developer on the job title) and I realize that I am having difficulties coping with frontend tasks. This is especially true when I am tasked with implementing a new frontend feature and I can see myself struggling to get the hang of frontend development philosophies and structure (where it feels like magic, I don't exactly see how HTML and javascript work in tandem and adding Angular.js makes it even more weird) as compared to backend (Having static typed languages (Java, C#), being able to find my way to see how is everything defined, and can easily traverse through the code).

Note* I am defining backend as everything after the REST curtain, code that is executed by the server and frontend as everything before the REST curtain, code that is for the web browser.

In the past, all my work and internships has been working with backend code, servers, databases, and files. For hackathons, I specifically do the backend architecture by myself while my teammates does the frontend coding.

With that being said, what would be the best approach to walk into frontend development with only backend experience? Language specific, what is the best way to understand how javascript and angularjs work with HTML and how do I traverse through such languages to find how everything is connected?

The justification behind this question is to seek ways to get started with understanding how Javascript, HTML, and CSS and its derivatives work so that I may have a better understanding of how it functions and how to traverse/program it. I have understanding of the basic JS syntax through web courses but not how is it integrated in web design.

4
  • 3
    I don't exactly see how HTML and javascript work in tandem I suggest starting by figuring that piece out. Everything else is based on those fundamentals.
    – Brandon
    Feb 19, 2015 at 0:31
  • recommended reading: Where to start
    – gnat
    Feb 19, 2015 at 15:49
  • 1
    HTML is easy, CSS is quirky and it takes a lot of practice to get comfortable with the static/relative/absolute positioning models. Javascript is fun because it has loose rules but a lot of it's strengths don't start to make sense until you really start to understand the functional/protypical aspects of the language. Angluar is a strange beast as it does a lot of magic with the DOM. Even with a solid understanding of JS it would be a pain (and a waste of time) to re-create its functionality. To understand how it's used you first need to break the urge to do MVC on the server-side. Feb 20, 2015 at 7:14
  • Learn the DOM. Start playing. !@#$ Angular. It's for the JavaScript/DOM illiterate. May 19, 2015 at 8:07

3 Answers 3

4

How did you start to be a backend developer? It must've felt very similar back then. Yet you managed it. I'm sure you'll do the same for frontend.

Here's how I'd suggest your learning:

  1. Get to know html first. That should be very easy and quick.
  2. Learn CSS. Not master it. Get familiar with majority of its properties (no problem if you don't master flexbox as long as you know it exists) and all CSS3 selector types (you should know exactly how they work for all of them)
  3. Play a bit with #1 and #2
  4. Learn DOM and understand how javascript works and interacts with it
  5. Learn jQuery and async communication - Ajax
  6. Learn Javascript thoroughly like OOP in prototypes
  7. learn Angular.

It should eventually all fall into place and be understandable.

4

I would probably start with basic HTML and CSS.
It's not hard when you already know how to program.
I would start by creating a personal project using HTML, CSS and Javascript.
Move on to jQuery if you get familiar with js.
I think the problem is that you are trying to achieve a lot at the same time.

With that said, there are many resources online nowadays, to learn basic front-end.

2

The short answer is to read a good book on Angular, read it again, and then practice coding, lots of it. That said, if you've never worked with UI, it can be an interesting challenge, because you might be missing some fundamental conceptual information to help you put it all together.

What follows assumes that you know what an HTML tag is, and how a form element works. If you don't, this is going to be a long haul.

Data Binding, or "how to get your dog to heel automatically"

Consider the following HTML:

<span id="name"></span>

Since you're a server specialist, I assume you know that, in addition to providing content like XML and JSON to a client, you can also provide an HTML page to a browser. What if you could look up a value from the database, insert it into the middle of that span tag, and then output it to the browser?

<span id="name">Rufus McGillicutty</span>

That's probably the most basic form of data binding: filling a page's elements with content from a database. And you don't even need to know Javascript or CSS to do it. Javascript frameworks do data binding by manipulating the DOM, rather than pasting strings together server-side.

Forms, or "This is where you type your name."

If you have a

<form></form>

then you can obtain the values of any controls in that form when the user presses the SUBMIT button. There are ways to bind those values to a data object, and now you have some data that you can insert into your database.

That's just CRUD, man.

Create, Read, Update, Delete. Those are the operations you will need to support. Well, those and things like "Place Order." If you've done any significant server work, this should already be familiar to you.

It's all about the architecture

Hopefully you've heard acronyms like MVC and MVVM. You should study those, not so much to understand the exact intricacies, but more to get the flavor of why these organizing principles work so well to build user interfaces that are useful and maintainable.

You should study, understand and know the following terms:

Model
View
ViewModel
Controller
Service Layer
Data Layer

Note that Angular might not be the best frontend framework to learn first. Knockout is probably more suitable in that regard, because it's simpler and the learning curve isn't quite so high. You should also have at least a passing familiarity with jQuery.

2
  • Why at all a framework? Wouldn't it be better to learn pure JavaScript and then choose the framework you think is best? Also if you know angular you are far away from knowing JavaScript. I mean with angular experience you won't be able to write for example node.js applications, with pure JavaScript experience it is way more likely.
    – Knerd
    Feb 19, 2015 at 7:51
  • @Knerd Why the assumption that you can't combine node.js with angular. It just depends on the structure of the app. angular provides client-side routing, node.js provides server-side routing. Angular can be used to structure the UI, while node can be used to provide the data-layer via a REST API (or equivalent). Feb 20, 2015 at 7:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.