Presentation is loading. Please wait.

Presentation is loading. Please wait.

NodeJS, Variables, Input/Output (I/O)

Similar presentations


Presentation on theme: "NodeJS, Variables, Input/Output (I/O)"— Presentation transcript:

1 NodeJS, Variables, Input/Output (I/O)
MIS 3406 Department of MIS Fox School of Business Temple University

2 Purpose for these units
Who loves to code? Who feels enabled to create new things? Who feels enable to dig into a system, understand exactly how it works and improve it? Who feels ready to build server applications with API in 3502?

3 Goals Quick refresher of programming
focused on programming logic, not all of the HTML and CSS stuff Further develop you programming abilities Get better at the old stuff Learn about new stuff like Passing arguments Reading/writing files Executing host command Position you for success in 3502

4 What exactly is Node (or NodeJS)?
NodeJS = JavaScript – HTML – CSS And is used to develop the server side of applications in client/server systems

5 What you will need Install NodeJS on your machine
After you install NodeJS, you will need to install readline-sync “npm install readline-sync” Install Notepad++ on your machine A love of the command line! Add a contact to your called “ Code” that points to the address You’ll need to rename the file to be a .txt file to it

6 The basic syntax rules for JavaScript
JavaScript is actually pretty forgiving when it comes to missing semi-colons. Still, it is best to end each statement with a semi-colon.

7 Variables

8 Rules for naming variables
A list of reserved words are on page 59 of your textbook.

9 Camel casing versus underscore notation
theCat theDog theHouse Versus… the_cat the_dog the_house

10 Naming recommendations for identifiers

11 JavaScript’s primitive data types
Discuss: Can you give me an example of each of these? Can you tell me what these are in your own words?

12 Examples of number values

13 Examples of string values

14 The two Boolean values

15 How to declare and assign a value to a variable in two statements
Notice the use of the var command here. We use var when creating a new variable.

16 How to declare and assign a value to a variable in one statement

17 Could it be this easy… …without all of that HTML and CSS stuff

18 NodeJS isn’t Quite JavaScript
Remember… Replace with…

19 Replacement for prompt

20 Prompt for numbers…

21 What is an “Argument”?

22 Hello World with Arguments

23 Pair Programming Pair programming is an agile software development technique in which two programmers work together at one workstation. One, the driver, writes code while the other, the observer or navigator,[1] reviews each line of code as it is typed in. The two programmers switch roles frequently. - Wikipedia

24 What did you learn? Write a program that prompts you for and displays the following information: Your name Your address, with city, state, and ZIP Your telephone number Your college major Can you change this program to accept all of this information as arguments? On the Windows platform, you can wrap strings that contain blanks with quotes to pass them as a single argument. For example: node DisplayInfo.js “Mart Doyle” “13047 Sewell Road” Philadelphia PA 19116…


Download ppt "NodeJS, Variables, Input/Output (I/O)"

Similar presentations


Ads by Google