DevMAG - November 2013

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 0

Learn JS

javascripting guide
06
NOVEMBER 2013
dev
PAKISTANS FIRST DEVELOPMENT ORIENTED MAGAZINE
What is ASP.NET?
an article describing ASP.NET
a project of SAT-NET DEV | ELEARN
http://www.devMAG.PK/
is
s
u
e
#
0
3
08
ASP.NET vs PHP
a comprehensive compari-
son
11
Initial Issues In
WebApp Dev
a detail article on common
issues faced during develop-
ment
12
NEWS
get updated
15
2
NOVEMBER 2013 devMAG
contents
04
MESSAGE
before getting starting read
the message from president of
devMAG
08
What is ASP.NET?
a detail article on ASP.NET
15
NEWS
get updated to the technology
news and development news
across the globe
12
Initial Issues In WebApp Development
get a deatil view on the issues com-
monly faced during 1st WebApp Dev
06
Learn JavaScripting
a detail guide on JS, how to work
with HTML Forms, etc
11
ASP.NET VS PHP
a comprehensive comparison
between both languages
Irtaza Ahmed Qureshi
Chief Editor / President
Muhammad Fuzail Zubari
Editor
illumitex studios
Creative Art Team
Sundas Taj, Sumreen Ashraf, Saman Ansari,
Behroz Ahmed
Writers
SAT-NET Dev
Advertisement Team
Saeeda Beenish Zahra
Contributors
o
u
r

t
e
a
m
:
If you have any issues regarding this magazine
or want to learn about new technology or pro-
gramming language or request any new article
just send us an email at:
email us @: info@devmag.pk
3
NOVEMBER 2013
devMAG
4
NOVEMBER 2013 devMAG
5
NOVEMBER 2013
devMAG
message
Asslam-O-Alykm!
Dear Readers, I have been a bit successful in my aim to provide some technical guide-
lines along with help to every level of developers from beginner to expert. My entire team
is working really hard to write articles for the readers of the devMAG so that they can learn
more and more.
I am also thankful to everyone who have given their critics, suggestions and feedback
for devMAG. I am quite happy with the level of success the magazine have achieved in a
small span but still have to go a long way ahead. I am also happy that devMAG has played a
vital role in helping weak developers to enrich their concepts.
InshAllah from January 2014, devMAG will start a new series of tutorials with experi-
enced developers so that you can enjoy the same level of content which one can get after
a huge amount of money. But surely InshAllah soon many new surprises will be coming out
for you.
devMAG Forums have been developed. Please visit it, http://forum.devMAG.PK/, join
it, spread it and start helping others. Also help us to spread so that everyone can get bene-
ft. May Allah Bless Everyone. Ameen!
President / ceo satnetdev:
Irtaza ahmed qureshi
6
NOVEMBER 2013 devMAG
A very basic use of java-script in
HTML form is to check whether the text
feld is flled or not. In other words we
can say that the input felds in html form
are flled with some text or not I going
tell u a very basic about the java script to
check. First of all make an html form with
a specifc id give to the input/text felds.
As shown in the given image below.
The front end of the form as shown in
the above image the code for the form
is given below image it will clearly show
that what actually the code is:
JS
by: Behroz Ahmed
The given above code will show
you that how the form will be made
that are given in the above image.
Now you can see that every input
type feld have some specifc name
through which we can access that
specifc input type feld. In other
words we can say that this name
is generally known as the id of that
particular given string or input feld.
The example is given as shown in
the image given below.
7
NOVEMBER 2013
devMAG
Now you can see that all the given above felds have some specifc name or we can say that a
specifc id through which we can access the felds whether they are flled with some text or not.
Now come to our major assignment is to check these felds with JavaScripts code.
At the top in the form image there is a button of a submit this submit button have a call function
behind this as shown in the image given below.
In above given image there is a button and this button have a call function name as Validity and
the function is defne in the tag of <script></script> and the function is defne in between this
tag where the program check the validity or in other words we can say that the felds are flled or
not.
The code for java script is given below.
Is this piece of code you can see that we access every input feld in the html in java script using
their name. In this code frstly we
defne a variable name as err-
Str which we can understand by
error string name.
var x=document.forms[job]
[name].value;
In the above line we defne a
variable named as x in which we
get the value entered in the text
feld of name in the form.by ac-
cessing the value from the from
the form in the html we have to
enter the following felds.
Document predefne func-
tion in java script
Form that take the data
from the form
Job the name of the form
Name the id.name of the
text/input feld
Value predefne function
in JavaScript to take the value
from the from

x = replace (/ [^a-zA-Z]
+/g,);
This statement means that the
name feld only contains alpha-
bets that they are in upper case
or lower case.
If (x==null || x==)
{
errStr+=Enter valid
name\r\n;
}
Its a check statement that
checks whether the feld is
flled or empty if the feld is
empty then it copy a relevant
error statement in it and dis-
play at the end.
All the other felds will be
done with the same method.
If he input felds in not flled
or in other word in empty or
having a null value then at ev-
ery stage of check some value
related of the particular feld
in entered in the errStr and at
the end those flled which are
not flled with generate an er-
ror that these felds are not
flled or having some error.
8
NOVEMBER 2013 devMAG
Before starting ASP.NET we assume that you know about HTML . HTML is a very important
language to develop and design webpages. As we use HTML to develop webpages and design
them in the required way but as the time has passed the demands of then users has increased.
In HTML the pages are created statically but in ASP.NET we create the webpages dynamically
which is very fast and efcient . And it is very easy to handle the pages. So its time to have a
brief introduction of ASP.NET.
Introduction to ASP.NET:
ASP.NET stands for Active Server Pages .NET. It is a very useful language that is used to make
webpages and web technologies. It is a very useful tool that helps programmers and develop-
ers to make their web pages in a very easy and facilitating way. It provides tool box that is very
helpful and easy to use. In ASP the the code is executed on the server side and its output is
sent to the users side. It is not limited in supporting the languages you can choose any lan-
guage that is easy and convenient with you application. Not only desktop applications you can
also use variables, defne functions can make use of database or connection to it.
Features of ASP.NET that support accessibility:
Not color dependent
Style sheets are not required.
Style properties support positioning.
Controls and labels are associated.
Captions and table columns are rendered with tables.
Advantages of ASP.NET:
Due to early binding performance is better.
ASP.NET reduces the code
Applications are safe and secure due to windows authentication and confguration.
The ASP.NET framework provides a toolbox which facilitates a lot of features with drag
and drop feature as well.
It is very easy to use ASP.NET and it makes easy to execute a simple program.
It is easy to maintain and write the code in ASP.NET because server executes the source
code .
Before sending to the browser code is executed on the server.
You can choose the language that you think is the best for your application.
Your application will always be available on request because if the process is dead due
to some reason a new process is created.
All the applications and components are monitored all the time so if there are some ille-
gal activates the server will stop those activities and restarts.
So you can use ASP.NET very easily by selecting the particular language you choose for your
software , and can develop attractive and useful website.
ASP.NET
GET STARTED TO:
BY: SUMREEN ASHFAQ
9
NOVEMBER 2013
devMAG
10
NOVEMBER 2013 devMAG
11
NOVEMBER 2013
devMAG
Cost:
ASP.NET VS PHP
BY: SUNDAS TAJ
Run ASP programs one needs IIS
installed on a Windows platform
server, which is not free
PHP programs run on Linux,
which is free.
Support for Cross Plat-
form:
Yes Yes
Database: Support any database, Microsoft
SQL Server, Oracle SQL, LINQ,
MySQL, PostSQL, etc.
Support any database, MySQL,
Oracle SQL, MSSQL, PostSQL,
etc.
Frameworks: BuiltIn framework (web forms,
web pages and mvc framework)
available which will force devel-
opers to use OOPs
You can write both procedural
and OOPs based code
Development IDE: Recommended:
* Microsoft Visual Studio
But you may work on any IDE
available for .NET
Recommended:
* Zend Studio
But you may work on any IDE
available, such as Notepad++
Extensibility: * HTTPHandlers
* HTTPModules
* ISASP Extensions, etc.
PECL PHP Extension Communi-
ty Library
Recommended for Huge
systems?
Yes No
Easy to Learn: Yes Yes
Advancement:
Backward Compatibility:
Performance:
Deployment:
Growing Rapidly
Old code will work on new
framework versions without
change
Faster
Multiple methods available, such
as: Publish Website, FTP Upload,
WebDeploy, etc
Growing with a limited speed
Old code might need tweaks to
make it work on latest versions
Faster for small programs and
slower for medium-to-big pro-
grams
You need to copy/paste code to
server somehow (e.g.: FTP)
ASP.NET PHP
12
NOVEMBER 2013 devMAG
According to Wikipedia a web ap-
plication is any application that
uses a web browser as a client. So
what is a website, you ask? A web-
site is defned by its content, while
a web application is defned by its
interaction with the user.
For example, a news site would be
a website, but a spreadsheet or
a collaborative calendar would be
web applications. The news site
shows essentially the same infor-
mation to all visitors, while the cal-
endar processes individual data.
Common examples of web apps
includes; Facebook,Twitter, You-
tube, Google docs, Google voice,
Flickr etc.
Now that the introduction has
been made, I would like to dis-
cuss the initial issues you can face
during Web Application develop-
ment.
Problem#1: Scalability

Scalability is the ability of a sys-
tem, network, or process to han-
dle growing amount of work in an
appropriate manner or its ability
to be enlarged to accommodate
that growth.
I will give you an example, back in
2006, Facebook introduced a new
feature mini feed that designers
thought users would love. Instead
of forcing users to check up on ev-
ery friends Facebook pages con-
stantly to see any change in the
friends status, they created this
mini feed which instantly dis-
played all changes on their own
Facebook page.
However, the opposite happened.
Users rejected the mini feed. They
did not like how it was propagat-
ing personal information. They
saw it as an invasion of privacy.
Within 24 hours of the features
introduction, more than 750,000
of the then eight million users had
signed online petitions as a result
Facebooks new feature made
headlines in the next days paper.
A contributor to Facebooks mini-
initial ISSUES in WEBAPP DEVELOPMENT
feed debacle was the scale of their
design. Facebook, making any
change to their site, instantly af-
fects eight million people. If even
one percent has issues with the
change, thats 80,000 afected us-
ers. Concluding, designers need
to take both the scale of the user
base and the scale of the data into
account when thinking about how
to design their web-based appli-
cations efectively.
Problem#2: Visual Design
Visual design can have a huge
impact on how the application
communicates its use. The key
point here is that it should be
user friendly. For example, a user
booking an airline reservation
does not want to think about the
technicalities of interpreting the
applications screen. They want to
think about their vacation destina-
tion and how they will be enjoying
it. So the visual design should be
clear and concise that it does not
take the users focus away from
what they wish to think about and
forces them to try to guess what
the designers are trying to tell
them.
Problem#3: Comprehensiveness
A problem regarding the content
of web applications is that they
are not comprehensive enough.
Web applications should be de-
signed in such a manner that
they deliver all the information
the user is looking for or might be
looking for. Even if the application
functions properly, it will fail the
user if they dont understand the
information it is trying to tell them.
Often addition relevant informa-
tion is given in the FAQ section,
which is a good way to handle this
problem.
Problem#4 Interactivity:
Some say that in design the devil
is always in the details, a funny but
an accurate way of putting it. One
of the major diferences between
a web application and other types
of web pages is that the user in-
terface is far more interactive. On
a content-rich site, users mostly
click links and occasionally search.
Yet, in a web application, they en-
ter data, sort it, rearrange it, and
move back and forth through the
screens. Users do not always fol-
low the happy path. They enter
data incorrectly. They decide they
need to go back and change some-
thing they have already entered.
They discover they need to learn
more about what the application
is asking them and, thereby, need
more detailed assistance.
Something as simple as always
providing a mechanism to undo
whats already been done can cre-
ate interesting usability dynamics.
This is an suitable way of making
your design more interactive and
easy to use.
Problem#5 Usability: Change Initi-
ating Management
We all know that users are resis-
tant to change, yet designing how
the change will happen is often
overlooked; a serious problem
that should not be overlooked.
The problem with quick changes
occurs when users frequently use
an application and become used
to the old settings. Even when the
change is to their advantage, they
often need warning and support
to go from the old to the new.
Teams should be made to design
the change process along with de-
signing the changes themselves.
Paying attention to how users
make the transition can increase
a changes adoption and make it
more welcome.
Therefore if you are developing
your own web application you
need to take into account all these
points and you web app will be a
hit. Happy developing!
BY: SAMAN ANSARI
13
NOVEMBER 2013
devMAG
contact dev mag team to get your ad here
your ad
here
14
NOVEMBER 2013 devMAG
Image Credits: TECHHIVE
Nokia Lumia 2520 Comparison Chart with Surface 2 & RT
15
NOVEMBER 2013
devMAG
NEWS
GET UPDATED TO LATEST
BY: SAEEDA BEENISH ZAHRA
16
NOVEMBER 2013 devMAG
Google Searches- the easiest way!
Noticing a small microphone at the end of your Google
search bar? That is Ok Google a new search facility very
recently launched by Google. It is for any system having
Chrome browser with a microphone and are on the Goo-
gle search page. Now desktop and laptop users can do a
Google search without typing with Chrome extension just
by speaking aloud.
Getting it is easy enough. Simply follow these instructions:
1. Download the extension.
2. Click agree to give your permission to use your
microphone.
3. Visit Google.com on Chrome and give it a try. Just
say Ok Google and then ask your question.
Classrooms Modernized
Teachers should no longer worry about making their
students fall asleep during lectures because classrooms
can now be modernized by bringing their device iPad to
school! You heard it correct teachers! Google Play for
Education has been ofcially launched. Its an extension
of Google Play thats designed for schools, simplifying
discovery of educational apps. Now you can show chil-
dren educational, videos, animations, make them listen
to rhymes, stories and what not! Not satisfed with the
already content? Make your apps in 5 easy steps!
Scientists on the go
Do you think scientists are boring with a pair of
nerdy glasses always working in labs? Well not
anymore! Latest Android apps are making tasks
of scientists easier. With app like Pair wise Pro-
tein Aligner you can align local and global pro-
tein sequences in instants away from lab. What
is more is that you can also view dot plots from
the alignment.
Another app Antibody Resource, available for
both android, iPhone and iPad searches through
a list of over 225,000 antibody products from a
variety of suppliers using criteria like host spe-
cies.
Now we see scientists in a whole new light
thanks to technology.
17
NOVEMBER 2013
devMAG
Say Goodbye to boring UIs
With the release of Android 4.4, Google has fnally
removed the bright blue from the system UI ele-
ments! This improvement will instantly apply to all
applications, and for your next app you can now
make your app stand out by using the new translu-
cent system bars.
There are two ways of doing this:

Setting Window Translucent Status to true in the
theme will fll the area behind the top status bar.
Setting Window Translucent Navigation to true
in your theme will fll the area behind the bottom
navigation area with your view. And your settings
are ready. Simple as that!
Amazing Android Update for Moto X
Thought Motorola was boring and stopped using it long ago?
Well not anymore! Verizon Moto X is the frst carrier-branded
device to see ofcial Android 4.4 KitKat. Its highpoints include;
Improved Phone dialer
More gallery goodies
New Hangouts app
Color emojis
Drag to focus and expose
Not enough?
Whats more is Restyled status and navigation bars, new full-
screen mode, and enhancements to Motorola features like
Touchless Control.
Nat Geo Kids magazine now HD
iPad is fast replacing paper products. Why you
ask? Its the quality that matters of course! Nat
Geo kids magazine is now available on iPad for
download! Entertaining for children of 6 years
and more. Each issue is flled with:
Appealing animal stories, amazing
strange-but-true facts and videos.
Large colorful photo galleries in HD.
Educational fll-in word games, quizzes
(that you will feel like giving), puzzles, jokes, and
much more.
18
NOVEMBER 2013 devMAG
devMAG
devMAG is a project of SAT-NET Dev. Supported by Strahlen Studios & Alpha Drupal. All the
content is protected by: copyrights 2013 SAT-NET Dev. All Rights Resereved with SAT-NET Dev.
No one can reuse or copy any of the content from this magazine without permission of SAT-NET
Dev. All trademarks use in this magazine are registered trademarks of their respective owners.
SAT-NET Dev Strahlen Studios Alpha Drupal

You might also like