DevMAG - November 2013

  • Upload
    sam-sam

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

  • 8/22/2019 DevMAG - November 2013

    1/19

    Learn JSavascripting guide

    06

    NOVEMBER 2013

    devPAKISTANS FIRST DEVELOPMENT ORIENTED MAGAZINE

    What is ASP.NET?an article describing ASP.NET

    a project ofSAT-NETDEV| ELEARNhttp://www.devMAG.PK/

    issue

    #03

    08

    ASP.NET vs PHPa comprehensive compari-son

    11

    Initial Issues InWebApp Deva detail article on commonissues faced during develop-ment

    12

    NEWSget updated

    15

    http://devmag.satnetdev.com/http://devmag.satnetdev.com/
  • 8/22/2019 DevMAG - November 2013

    2/19

    2 NOVEMBER2013devMAG

    04MESSAGEbefore getting starting readthe message from president ofdevMAG

    08What is ASP.NET?a detail article on ASP.NET

    15NEWSget updated to the technologynews and development newsacross the globe

    12Initial Issues In WebApp Developmentget a deatil view on the issues com-monly faced during 1st WebApp Dev

    06Learn JavaScripting

    a detail guide on JS, how to workwith HTML Forms, etc

    11ASP.NET VS PHP

    a comprehensive comparisonbetween both languages

    Irtaza Ahmed QureshiChief Editor / President

    Muhammad Fuzail ZubariEditor

    illumitex studiosCreative Art Team

    Sundas Taj, Sumreen Ashraf, Saman Ansari,

    Behroz AhmedWriters

    SAT-NET DevAdvertisement Team

    Saeeda Beenish Zahra

    Contributors

    o

    urteam:

    If you have any issues regarding this magazineor want to learn about new technology or pro-gramming language or request any new article

    just send us an email at:

    email us @: [email protected]

  • 8/22/2019 DevMAG - November 2013

    3/193NOVEMBER2013 devMAG

  • 8/22/2019 DevMAG - November 2013

    4/19

    4 NOVEMBER2013devMAG

  • 8/22/2019 DevMAG - November 2013

    5/195NOVEMBER2013 devMAG

    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 teamis working really hard to write articles for the readers of the devMAG so that they can learnmore and more.

    I am also thankful to everyone who have given their critics, suggestions and feedbackfor devMAG. I am quite happy with the level of success the magazine have achieved in asmall span but still have to go a long way ahead. I am also happy that devMAG has played avital 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 aftera huge amount of money. But surely InshAllah soon many new surprises will be coming outfor you.

    devMAG Forums have been developed. Please visit it, http://forum.devMAG.PK/, joinit, spread it and start helping others. Also help us to spread so that everyone can get bene-t. May Allah Bless Everyone. Ameen!

    President / ceo satnetdev:

    Irtaza ahmed qureshi

  • 8/22/2019 DevMAG - November 2013

    6/19

    6 NOVEMBER2013devMAG

    A very basic use of java-script inHTML form is to check whether the texteld is lled or not. In other words wecan say that the input elds in html formare lled with some text or not I goingtell u a very basic about the java script tocheck. First of all make an html form with

    a specic id give to the input/text elds.As shown in the given image below.

    The front end of the form as shown inthe above image the code for the formis given below image it will clearly showthat what actually the code is:

    JSby: Behroz Ahmed

    The given above code will showyou that how the form will be madethat are given in the above image.Now you can see that every inputtype eld have some specic namethrough which we can access thatspecic input type eld. In otherwords we can say that this name

    is generally known as the id of thatparticular given string or input eld.The example is given as shown inthe image given below.

  • 8/22/2019 DevMAG - November 2013

    7/197NOVEMBER2013 devMAG

    Now you can see that all the given above elds have some specic name or we can say that aspecic id through which we can access the elds whether they are lled with some text or not.Now come to our major assignment is to check these elds with JavaScripts code.At the top in the form image there is a button of a submit this submit button have a call functionbehind 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 andthe function is dene in the tag of and the function is dene in between thistag where the program check the validity or in other words we can say that the elds are lled ornot.The code for java script is given below.

    Is this piece of code you can see that we access every input eld in the html in java script usingtheir name. In this code rstly wedene a variable name as err-

    Str which we can understand byerror string name.var x=document.forms[job][name].value;In the above line we dene avariable named as x in which weget the value entered in the texteld of name in the form.by ac-cessing the value from the fromthe form in the html we have to

    enter the following elds. Document predene func-tion in java script Form that take the datafrom the form Job the name of the form Name the id.name of thetext/input eld Value predene function

    in JavaScript to take the valuefrom the fromx = replace (/ [^a-zA-Z]+/g,);This statement means that thename eld only contains alpha-bets that they are in upper caseor lower case.If (x==null || x==)

    { errStr+=Enter validname\r\n;}

    Its a check statement that

    checks whether the eld islled or empty if the eld isempty then it copy a relevanterror statement in it and dis-play at the end.

    All the other elds will bedone with the same method.If he input elds in not lledor in other word in empty or

    having a null value then at ev-ery stage of check some valuerelated of the particular eldin entered in the errStr and atthe end those lled which are

    not lled with generate an er-ror that these elds are notlled or having some error.

  • 8/22/2019 DevMAG - November 2013

    8/19

    8 NOVEMBER2013devMAG

    Before starting ASP.NET we assume that you know about HTML . HTML is a very importantlanguage to develop and design webpages. As we use HTML to develop webpages and designthem 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 dynamicallywhich is very fast and ecient . And it is very easy to handle the pages. So its time to have abrief 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 makewebpages 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 veryhelpful and easy to use. In ASP the the code is executed on the server side and its output issent 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, dene 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 conguration. The ASP.NET framework provides a toolbox which facilitates a lot of features with dragand 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 sourcecode . 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 dueto 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 yoursoftware , and can develop attractive and useful website.

    ASP.NETGET STARTED TO:

    BY: SUMREEN ASHFAQ

  • 8/22/2019 DevMAG - November 2013

    9/199NOVEMBER2013 devMAG

  • 8/22/2019 DevMAG - November 2013

    10/19

    10 NOVEMBER2013devMAG

  • 8/22/2019 DevMAG - November 2013

    11/1911NOVEMBER2013 devMAG

    Cost:

    ASP.NETVSPHPBY: SUNDAS TAJ

    Run ASP programs one needs IISinstalled on a Windows platformserver, which is not free

    PHP programs run on Linux,which is free.

    Support for Cross Plat-form:

    Yes Yes

    Database: Support any database, MicrosoftSQL 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 proceduraland OOPs based code

    Development IDE: Recommended: * Microsoft Visual Studio

    But you may work on any IDEavailable for .NET

    Recommended: * Zend Studio

    But you may work on any IDEavailable, such as Notepad++

    Extensibility: * HTTPHandlers* HTTPModules* ISASP Extensions, etc.

    PECL PHP Extension Communi-ty Library

    Recommended for Hugesystems?

    Yes No

    Easy to Learn: Yes Yes

    Advancement:

    Backward Compatibility:

    Performance:

    Deployment:

    Growing Rapidly

    Old code will work on newframework versions withoutchange

    Faster

    Multiple methods available, suchas: Publish Website, FTP Upload,WebDeploy, etc

    Growing with a limited speed

    Old code might need tweaks tomake it work on latest versions

    Faster for small programs andslower for medium-to-big pro-

    grams

    You need to copy/paste code toserver somehow (e.g.: FTP)

    ASP.NET PHP

  • 8/22/2019 DevMAG - November 2013

    12/19

    12 NOVEMBER2013devMAG

    According to Wikipedia a web ap-plication is any application thatuses a web browser as a client. Sowhat is a website, you ask? A web-site is dened by its content, while

    a web application is dened by itsinteraction with the user.For example, a news site would bea website, but a spreadsheet ora collaborative calendar would beweb applications. The news siteshows essentially the same infor-mation to all visitors, while the cal-endar processes individual data.Common examples of web appsincludes; Facebook,Twitter, You-

    tube, Google docs, Google voice,Flickr etc.Now that the introduction hasbeen made, I would like to dis-cuss the initial issues you can faceduring Web Application develop-ment.

    Problem#1: ScalabilityScalability is the ability of a sys-

    tem, network, or process to han-dle growing amount of work in anappropriate manner or its abilityto be enlarged to accommodatethat growth.I will give you an example, back in2006, Facebook introduced a newfeature mini feed that designersthought users would love. Insteadof forcing users to check up on ev-ery friends Facebook pages con-stantly to see any change in the

    friends status, they created thismini feed which instantly dis-played all changes on their ownFacebook page.However, the opposite happened.Users rejected the mini feed. Theydid not like how it was propagat-ing personal information. Theysaw it as an invasion of privacy.Within 24 hours of the featuresintroduction, more than 750,000

    of the then eight million users hadsigned online petitions as a resultFacebooks new feature madeheadlines in the next days paper.A contributor to Facebooks mini-

    nitial ISSUESin WEBAPPDEVELOPMENTfeed debacle was the scale of theirdesign. Facebook, making anychange to their site, instantly af-fects eight million people. If evenone percent has issues with the

    change, thats 80,000 aected us-ers. Concluding, designers needto take both the scale of the userbase and the scale of the data intoaccount when thinking about howto design their web-based appli-cations eectively.

    Problem#2:Visual Design

    Visual design can have a huge

    impact on how the applicationcommunicates its use. The keypoint here is that it should beuser friendly. For example, a userbooking an airline reservationdoes not want to think about thetechnicalities of interpreting theapplications screen. They want tothink about their vacation destina-tion and how they will be enjoyingit. So the visual design should be

    clear and concise that it does nottake the users focus away fromwhat they wish to think about andforces them to try to guess whatthe designers are trying to tellthem.

    Problem#3:Comprehensiveness

    A problem regarding the contentof web applications is that theyare not comprehensive enough.

    Web applications should be de-signed in such a manner thatthey deliver all the informationthe user is looking for or might belooking for. Even if the applicationfunctions properly, it will fail theuser if they dont understand theinformation 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 butan accurate way of putting it. Oneof the major dierences betweena web application and other typesof web pages is that the user in-

    terface is far more interactive. Ona content-rich site, users mostlyclick links and occasionally search.Yet, in a web application, they en-ter data, sort it, rearrange it, andmove back and forth through thescreens. Users do not always fol-low the happy path. They enterdata incorrectly. They decide theyneed to go back and change some-thing they have already entered.

    They discover they need to learnmore about what the applicationis asking them and, thereby, needmore detailed assistance.Something as simple as alwaysproviding a mechanism to undowhats already been done can cre-ate interesting usability dynamics.This is an suitable way of makingyour design more interactive andeasy to use.

    Problem#5 Usability: Change Initi-ating Management

    We all know that users are resis-tant to change, yet designing howthe change will happen is oftenoverlooked; a serious problemthat should not be overlooked.The problem with quick changesoccurs when users frequently usean application and become used

    to the old settings. Even when thechange is to their advantage, theyoften need warning and supportto go from the old to the new.Teams should be made to designthe change process along with de-signing the changes themselves.Paying attention to how usersmake the transition can increasea changes adoption and make itmore welcome.

    Therefore if you are developingyour own web application youneed to take into account all thesepoints and you web app will be ahit. Happy developing!

    BY: SAMAN ANSARI

  • 8/22/2019 DevMAG - November 2013

    13/1913NOVEMBER2013 devMAG

    contact dev mag team to get your ad here

    your adhere

  • 8/22/2019 DevMAG - November 2013

    14/19

    14 NOVEMBER2013devMAGImage Credits: TECHHIVE

    Nokia Lumia 2520 Comparison Chart with Surface 2 & RT

  • 8/22/2019 DevMAG - November 2013

    15/1915NOVEMBER2013 devMAG

    NEWSGET UPDATED TO LATEST

    BY: SAEEDA BEENISH ZAHRA

  • 8/22/2019 DevMAG - November 2013

    16/19

    16 NOVEMBER2013devMAG

    Google Searches- the easiest way!

    Noticing a small microphone at the end of your Googlesearch bar? That is Ok Google a new search facility veryrecently launched by Google. It is for any system havingChrome browser with a microphone and are on the Goo-

    gle search page. Now desktop and laptop users can do aGoogle search without typing with Chrome extension justby speaking aloud.

    Getting it is easy enough. Simply follow these instructions:1. Download the extension.2. Click agree to give your permission to use yourmicrophone.3. Visit Google.com on Chrome and give it a try. Justsay Ok Google and then ask your question.

    Classrooms Modernized

    Teachers should no longer worry about making theirstudents fall asleep during lectures because classroomscan now be modernized by bringing their device iPad toschool! You heard it correct teachers! Google Play forEducation has been ocially launched. Its an extensionof Google Play thats designed for schools, simplifyingdiscovery of educational apps. Now you can show chil-

    dren educational, videos, animations, make them listento rhymes, stories and what not! Not satised with thealready content? Make your apps in 5 easy steps!

    Scientists on the go

    Do you think scientists are boring with a pair ofnerdy glasses always working in labs? Well notanymore! Latest Android apps are making tasksof scientists easier. With app like Pair wise Pro-tein Aligner you can align local and global pro-tein sequences in instants away from lab. Whatis more is that you can also view dot plots fromthe alignment.Another app Antibody Resource, available forboth android, iPhone and iPad searches througha list of over 225,000 antibody products from avariety of suppliers using criteria like host spe-

    cies.Now we see scientists in a whole new lightthanks to technology.

  • 8/22/2019 DevMAG - November 2013

    17/1917NOVEMBER2013 devMAG

    Say Goodbye to boring UIs

    With the release of Android 4.4, Google has nallyremoved the bright blue from the system UI ele-ments! This improvement will instantly apply to allapplications, and for your next app you can nowmake 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 thetheme will ll the area behind the top status bar.Setting Window Translucent Navigation to truein your theme will ll the area behind the bottomnavigation area with your view. And your settingsare ready. Simple as that!

    Amazing Android Update for Moto XThought Motorola was boring and stopped using it long ago?

    Well not anymore! Verizon Moto X is the rst carrier-brandeddevice to see ocial 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 likeTouchless Control.

    Nat Geo Kids magazine now HD

    iPad is fast replacing paper products. Why youask? Its the quality that matters of course! NatGeo kids magazine is now available on iPad fordownload! Entertaining for children of 6 yearsand more. Each issue is lled with:

    Appealing animal stories, amazingstrange-but-true facts and videos.

    Large colorful photo galleries in HD.

    Educational ll-in word games, quizzes(that you will feel like giving), puzzles, jokes, and

    much more.

  • 8/22/2019 DevMAG - November 2013

    18/19

    18 NOVEMBER2013devMAG

  • 8/22/2019 DevMAG - November 2013

    19/19

    devMAG

    devMAGis a project of SAT-NETDev . Supported by Strahlen Studios & Alpha Drupal. All the

    content is protected by: copyrights 2013SAT-NETDev . All Rights Resereved withSAT-NETDev .No one can reuse or copy any of the content from this magazine without permission of SAT-NETDev . All trademarks use in this magazine are registered trademarks of their respective owners.

    SAT-NET Dev Strahlen Studios Alpha Drupal