Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Step 1. Evaluate the Web Site Structure and Documentation Both PHP and ASP are s

ID: 3846419 • Letter: S

Question

Step 1. Evaluate the Web Site Structure and Documentation

Both PHP and ASP are server-side technologies and HTML, CSS and JavaScript are client-side technologies. Based on the lesson and your readings discuss the similarities and differences between client-side scripting and server-side programming. Remember that you need to put this in your own words and not copy from the text or other web sites.

This term the please compare and contrast the following:

DocType in the HTML page and the @Page declaration in the ASP page.

The <input> tag in HTML and the <asp:Textbox> tag

The <label> tag in HTML and the <label runat="server" id="content"/> tag

Step 2. Chapter 2 - Learning C#

You have already learned basic programming in one of the common programming languages such as Java. C# is very similar. What we would like you to do, is review Chapter 2. We know that you already know how to do this in another language. So, we don't need you to provide the definition. However, it would help to review how C# works. For example, Visual Basic, does not require a line termination character and does not use curly braces! So it's important to know the syntax of C#.

Create a short study guide. Provide snippets of code that show how you would accomplish these tasks in C#. Use your book as a reference but provide your own examples.

This term, all the examples should relate to "Cats".

How do you create variables in C#?

What data types are supported in C#?

How are statements terminated? What is the termination character for the end of a line?

What is the concatenation character?

Are variables case sensitive?

How do you comment one line? Multiple lines?

How do you assign a value to a variable?

What is the keyword var used for?

How do you escape characters in strings?

How do you create an array of four items?

How do you convert a string to a double or integer number? A number to a string?

What common methods can you use to manipulate a string?

How do you retrieve the current date? The current time?

Show how the If ElseIf works in C#.

Show how the Switch statement works in C#.

Show how the For loop works in C#

Show how the While loop works in C#

How do you create a method?

How do you create a function (where a value is returned)?

How do you pass parameters to a function?  

Explanation / Answer

Server-side - Uses

-It processes the user input
-Displays the requested pages
-Structure web applications
-Interaction with servers/storages
-Interaction with databases
-Querying the database
-Encoding of data into HTML
-Operations over databases like delete, update.

Server-side - Languages Example

There are several languages that can be used for server-side programming:

PHP
ASP.NET (C# OR Visual Basic)
C++
Java and JSP
Python
Ruby on Rails and so on.


Client-side - Uses

-Makes interactive web pages
-Make stuffs work dynamically
-Interact with temporary storage
-Works as an interface between user and server
-Sends requests to the server
-Retrieval of data from Server
-Interact with local storage
-Provides remote access for client server program

Client-side - Languages Example

There are many client-side scripting languages too.

JavaScript
VBScript
HTML (Structure)
CSS (Designing)
AJAX
jQuery etc.


create variables in C#--

int d = 3, f = 5;
byte z = 22;   
double pi = 3.14159;
char x = 'x';

data types are supported in C# -

Value types -- int, char, and float
Reference types -- object, dynamic, and string
Pointer types -- type* identifier;

statement termination --

The break statement terminates the closest enclosing loop or switch statement in which it appears. Control is passed to the statement that follows the terminated statement, if any.

the concatenation character --

The concatenation operator manipulates character strings and CLOB data

Operator   Purpose   Example
|| Concatenates character strings and CLOB data. SELECT 'Name is ' || last_name FROM employees;

Are variables case sensitive --

No, they are not case sensitive, however, you should always use the case that is in the manual, for consistency. In PHP variables are case sensitive but functions have no issue like this.

comment one line //

comment multiple line /* .... */

Assigning value to variable --

var x = 5;
var y = 6;
var z = x + y;


keyword var used for--

“Var” Keyword = Var keyword is an implicit way of defining DataTypes. Implicit means indirect way of defining variable types.


escape characters in strings --

In a normal string, you use \


Array of four items --

A[4] = {a,b,d,s}


convert a string to a double or integer number --

String s = "0.01";
int i = Integer.parseInt(s);

manipulate a string --

String Length , Index , Substring Removal .


retrieve the current date? --

DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date date = new Date();
System.out.println(dateFormat.format(date)); //2016/11/16 12:08:43

retrieve the current time? --

DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
LocalDateTime now = LocalDateTime.now();
System.out.println(dtf.format(now)); //2016/11/16 12:08:43


if (expression)
statement;

or

if (expression)
{
Block of statements;
}

or

if (expression)
{
Block of statements;
}
else
{
Block of statements;
}

or

if (expression)
{
Block of statements;
}
else if(expression)
{
Block of statements;
}
else
{
Block of statements;
}


switch( expression )
{
case constant-expression1:   statements1;
[case constant-expression2:   statements2;]
[case constant-expression3:   statements3;]
[default : statements4;]
}

while ( expression )
{
Single statement
or
Block of statements;
}


for( expression1; expression2; expression3)
{
Single statement
or
Block of statements;
}


do
{
Single statement
or
Block of statements;
}while(expression);

Create a method --

public static modifier.
int return type.
methodName name of the method.
a, b formal parameters.
int a, int b list of parameters.


create a function--

public int AddNumbers(int number1, int number2)
{
int result = number1 + number2;
return result;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote