Search

Android Development Principles | Guidelines

Getting started with Android development seems to be a big challenge. You’ve to have a deep understanding of android development principles and basic guidelines. Unfortunately, most of the developers don’t get the chance to learn the basics until it’s too late. If you’re just starting out, there are certain principles and guidelines that you’ve to stick to. What are these? Let’s dive in. Android development principles can be best explained by the SOLID acronym, as devised by Robert Martin. It refers to: Single Responsibility Open-Closed Principle Liskov Substitution Interface Segregation Dependency Inversion Robert Martin developed these five object-oriented design principles for the sole purpose of helping developers deliver maintainable and extensible systems. These principles not only help in writing a well-structured code but they also make sure that the code can easily be extended later. Take, for example, .NET. In the beginning, .NET was a mess and it were these principles that helped developers make a well formatted code for .NET applications and websites. So, let’s have a look at these principles individually. Single Responsibility Single Responsibility, as its name suggests, means that your classes should have only one responsibility. For example, if you have to perform calculations, mapping, and formatting, make 3 separate classes to handle each responsibly rather than making one class to handle all 3. But, what exactly do we mean by responsibility? A responsibility can be thought of as a “reason to change”. If you can think of more than one reason to change a class then you are probably breaking the Single Responsibility rule. The reason behind Single Responsibility is that it makes your class more complex and lead to code duplication issues which almost always ends up with non-updated codes. Open-Closed Principle           This means that your software entities like classes, functions, modules etc. should be open to extension but not modification. This is a very basic principle that should be followed no matter what platform you are coding for. This principle requires you to write a class or function or module in a way that it does need to be changed whenever your requirements change. For example, if you are making a class to calculate the area of a shape like a circle then you shouldn’t change the class every time a new shape comes as an input. Designing a base class and then extending it with the help of inheritance, or any other technique depending on the language you are using, is the way to go. This way, you won’t be making a change in the class for every new shape. Liskov Substitution Principle This is the type of a principle that is very tricky to explain even though almost all of us follow this principle unintentionally. Liskov Substitution Principle says that: “Objects should be replaceable with their subtype instances without having the need to alter the program.” This might be confusing but let me explain it with the help of an example. Let’s say you made a class that requires a List Object to perform a certain task. Now, what if we send an ArrayList Object to this class instead of a List Object? The class shouldn’t work right? No, the program will work just fine. The reason is the Liskov Substitution Principle. The ArrayList Object is a subtype of List class and, since, List class is an abstraction, the ArrayList Object will work without any problem. In short, you can replace the objects of List with any of its subtype without causing the program to break. So, if you require T and S in a subtype of T, then objects of T should be replaced by the objects of S without changing the properties of the program, especially the correctness property. Interface Segregation Principle This is a pretty straight forward principle. The Interface Segregation Principle states that there should be a lot of Client-specific User Interfaces rather than a general purpose User Interface. Let’s say a user has to enter his email address, fill a survey, and enter his favorite food. In this case, it would be better to make 3 separate User Interface pages instead of a single general purpose page that asks all of these questions. A general purpose User Interface will make your code complex because of the multiple callbacks as well as make the user confused. Remember, always give users small achievable goals rather than a big time-consuming task. Dependency Inversion Principle The Dependency Inversion Principle covers two things: High-level modules should be independent of the low-level modules. Both should depend on abstractions. Details should depend on Abstractions instead of Abstractions depending on the Details. You will be increasing the de-coupling by making your High-level modules independent of the low-level modules. Being a developer, you should know that requirements for an application changes a lot. And, changes are risky. So, making your modules independent will make them reusable as well as significantly reduce the risks involved in changing the implementations. In short, you will reduce the risk of changes by depending on the abstractions, for instance, interface rather than implementations. A few great tips for android developer that helps who wants to become one, you will undoubtedly have noticed that there are literally hundreds of thousands of apps on the Google Play store.
Android Development Principles | Guidelines
Sabih
Rated 4.0/5 based on 20 customer reviews

Android Development Principles | Guidelines

Getting started with Android development seems to be a big challenge. You’ve to have a deep understanding of android development principles and basic guidelines. Unfortunately, most of the developers don’t get the chance to learn the basics until it’s too late. If you’re just starting out, there are certain principles and guidelines that you’ve to stick to. What are these? Let’s dive in. Android development principles can be best explained by the SOLID acronym, as devised by Robert Martin. It refers to: Single Responsibility Open-Closed Principle Liskov Substitution Interface Segregation Dependency Inversion Robert Martin developed these five object-oriented design principles for the sole purpose of helping developers deliver maintainable and extensible systems. These principles not only help in writing a well-structured code but they also make sure that the code can easily be extended later. Take, for example, .NET. In the beginning, .NET was a mess and it were these principles that helped developers make a well formatted code for .NET applications and websites. So, let’s have a look at these principles individually. Single Responsibility Single Responsibility, as its name suggests, means that your classes should have only one responsibility. For example, if you have to perform calculations, mapping, and formatting, make 3 separate classes to handle each responsibly rather than making one class to handle all 3. But, what exactly do we mean by responsibility? A responsibility can be thought of as a “reason to change”. If you can think of more than one reason to change a class then you are probably breaking the Single Responsibility rule. The reason behind Single Responsibility is that it makes your class more complex and lead to code duplication issues which almost always ends up with non-updated codes. Open-Closed Principle           This means that your software entities like classes, functions, modules etc. should be open to extension but not modification. This is a very basic principle that should be followed no matter what platform you are coding for. This principle requires you to write a class or function or module in a way that it does need to be changed whenever your requirements change. For example, if you are making a class to calculate the area of a shape like a circle then you shouldn’t change the class every time a new shape comes as an input. Designing a base class and then extending it with the help of inheritance, or any other technique depending on the language you are using, is the way to go. This way, you won’t be making a change in the class for every new shape. Liskov Substitution Principle This is the type of a principle that is very tricky to explain even though almost all of us follow this principle unintentionally. Liskov Substitution Principle says that: “Objects should be replaceable with their subtype instances without having the need to alter the program.” This might be confusing but let me explain it with the help of an example. Let’s say you made a class that requires a List Object to perform a certain task. Now, what if we send an ArrayList Object to this class instead of a List Object? The class shouldn’t work right? No, the program will work just fine. The reason is the Liskov Substitution Principle. The ArrayList Object is a subtype of List class and, since, List class is an abstraction, the ArrayList Object will work without any problem. In short, you can replace the objects of List with any of its subtype without causing the program to break. So, if you require T and S in a subtype of T, then objects of T should be replaced by the objects of S without changing the properties of the program, especially the correctness property. Interface Segregation Principle This is a pretty straight forward principle. The Interface Segregation Principle states that there should be a lot of Client-specific User Interfaces rather than a general purpose User Interface. Let’s say a user has to enter his email address, fill a survey, and enter his favorite food. In this case, it would be better to make 3 separate User Interface pages instead of a single general purpose page that asks all of these questions. A general purpose User Interface will make your code complex because of the multiple callbacks as well as make the user confused. Remember, always give users small achievable goals rather than a big time-consuming task. Dependency Inversion Principle The Dependency Inversion Principle covers two things: High-level modules should be independent of the low-level modules. Both should depend on abstractions. Details should depend on Abstractions instead of Abstractions depending on the Details. You will be increasing the de-coupling by making your High-level modules independent of the low-level modules. Being a developer, you should know that requirements for an application changes a lot. And, changes are risky. So, making your modules independent will make them reusable as well as significantly reduce the risks involved in changing the implementations. In short, you will reduce the risk of changes by depending on the abstractions, for instance, interface rather than implementations. A few great tips for android developer that helps who wants to become one, you will undoubtedly have noticed that there are literally hundreds of thousands of apps on the Google Play store.
Rated 4.0/5 based on 20 customer reviews
Android Development Principles | Guidelines

Getting started with Android development seems to ... Read More

About SELENIUM WEBDRIVER-3

Why WebDriver-3? In present market we have a tool called IDE. It is a tool which works only on Mozilla firefox. It has many drawbacks and doesn’t generate proper reports. IDE is not a preferred tool because sometimes when the scripts run, it finds the locator and sometimes it doesn’t find it and so the script fails. So, to overcome all these challenges we have a tool called WebDriver. WebDriver works on Multiple browsers like Firefox, IE, Chrome, Safari, Opera etc. It supports multiple languages like Java, C#, Ruby, Python and JavaScript. With WebDriver, we can make dynamic scripts like scripts on Webpages which changes everyday and we can make our scripts run on multiple browsers. Downloading WebDriver-3 Jars and configuring in eclipse To start with WebDriver, the first thing we need to do is to download WebDriver Jars and configure it in Eclipse IDE. We need to download Jar files of WebDriver from the official website of Selenium, which is Selenuimhq.org where we need to go to download section and under the download section, we will see the latest version which is 3.4.0. Click on the link and file will be downloaded in the downloads folder. Also, click on Change log at Selenium website to describe what has changed in the new version. The last 2.x version was 2.53 which is a stable build, meaning it has no major issues. After 2.53, the next build which came up was 3.XX. The changes made in 3.0 is that, minimum java version requires 1.8, where we need to make sure that jdk8 is installed. Installing Java To install java, Go to Google and type download Jdk. Go to first link as shown below Depending upon the system, we need to install either Windows x32 or Windows x64 bit and accept the License Agreement. For downloading Java, we need to click on Download link, where Zip file will be downloaded on our PC. Go to downloaded folder and extract it and double click on exe. Java will be installed in the system and now we need to configure the class path. If we are using v2.53.0 version, then we will be needing Firefox 40 or below. In case, we are using 3.0 then we need to go for latest version of Firefox. Configuring Jar Files in Eclipse Step1: Open Eclipse and make a New Project (ex:Sample) Step2: Right click on the project and select the option Properties as shown below Step3: Go to Java Build Path > Libraries Tab and click on Add External Jars as shown below: Now, go to the location where we saved our Jar Files and add all the jar files. It will appear like below image after adding all Jar files: Once we are done with configuring Jar files in eclipse, we can see a folder called Referenced Libraries under Project folder where we have all our Jar Files. Architecture of selenium webdriver 3 First we need to know a few concepts if we want to understand the working of Selenium WebDriver Architecture. Language Binding or Selenium Client Library Selenium API Remote WebDriver Json Wired Protocol WebDrivers Language Binding or Selenium Client Library : It is nothing but a collection of Jar files, where the language in which we write our selenium framework is present. It means that the language which we used to write the script may be Java, C#, Ruby, Python, perl. Selenium API : API Stands for Application Programming Interface. API is a particular set of rules and specifications that software programs can follow to communicate with each other. API serves as an interface between software program and facilitate their interaction. API is a software to software interaction which means API works between software to software. With the help of APIs, applications talk to each other without any user knowledge. Remote WebDriver : It is an implementation class of the webdriver interface that a test script developer can use to execute their test script through webdriver server on remote machine. JSON:  It stands for JavaScript Object Notation. It is a lightweight data interchange format which helps us to interchange the data. JSON is used to transfer data between client and server on the web. A simple JSON file has .json extension. JSON wired protocol send data in JSON format. Thereafter, the server will firstly parse the data and execute it and after that, response given by the server will be sent back to the client in JSON format. Webdriver: Webdriver is a tool for automating web applications and verifying that     they work as expected.  Architecture: Tester writes script in any language like java, C# etc and selenium client library will communicate with selenium API. Selenium API will send the command taken from language level binding to browser driver with the help of JSON wired protocol and sends the request to Browser Driver, it may be Firefox driver, IE driver, Chrome driver. When we run all the commands we write in the script, it is converted with JSON wired protocol over HTTP and it will convert into URL and the request made by the HTTP and send to the browser. These browser drivers will use the HTTP server for getting HTTP request and these HTTP Server filter out all commands which we need to execute. Drivers for Firefox, IE, Chrome FirefoxDriver: It is an inbuilt class in Selenium. Lets create a New Class in Eclipse Class Name: Drivers_Selenium Inside main function, create an object of FirefoxDriver class like shown below: FirefoxDriver is an inbuilt class inside Referenced Libraries jars, where we can move mouse over the error and import FirefoxDriver class. After creating the object and running the program, we will get an exception like “The path to the driver executable must be set by the webdriver.gecko.driver system property” like shown in below image. import org.openqa.selenium.firefox.FirefoxDriver; public class Drivers_Selenium { public static void main(String[] args) { // TODO Auto-generated method stub new FirefoxDriver(); } } Steps to Download Geckodriver exe file: Step1: Go to seleniumhq.org Step2: Click on Download Tab Step3: Click on Mozilla Geckodriver 0.16.1 version in browsers session Step4: Click on geckodriver-v0.17.0-win64.zip or geckodriver-v0.17.0-win32.zip based upon our operating system. Open the downloaded folder and extract it, after extracting we will get geckodriver.exe file like shown below image. Now there is no need to double click on the geckodriver file, all we need is to set the System property known as “webdriver.gecko.driver” and we have to give the path of  geckodriver exe file. As java is a case sensitive language make sure that “webdriver.gecko.driver” is in lower case. Run the program where we can see a blank firefox getting opened. Now we need to give object reference as “FirefoxDriver fd” so that we can use the features of FirefoxDriver object. Inside the documentation of selenium, we find WebDriver interface. Inside this interface, we see a function get( ) which loads the new webpage in the current browser window. It open up a new URL.We can use the function “fd.get ” and get the URL. Run the above program where we can see the browser launching and it opens yahoo.com ChromeDriver : As the name suggests, it is for chrome. After creating the object and running the program, we will get an exception like “The path to the driver executable must be set by the webdriver.chrome.driver system property”.Now we also need to download an exe file.Go to download session in seleniumhq.org and scroll down where we find Google Chrome Driver link and click on it and it will redirect to the next page. From here we can download based upon our operating system as shown in below image.Whatever be the operating system, whether it is 32xbit or 64xbit, we can download the same file. Open the downloaded folder and extract it, after extracting we will get “chromedriver” file like shown in the below image. Now, there is no need to double click on chromedriver file, all we need to do is set the System property known as “webdriver.chrome.driver” and we have to give the path of chromedriver.exe file. As java is a case sensitive language, make sure that “webdriver.chrome.driver” is in lower case. Run the above program where we can see a blank chrome browser will launch. Now we need to give object reference as “ChromeDriver ” so that we can use the features of ChromeDriver object. Inside the documentation of selenium, we find WebDriver interface.Inside this interface we see a function get( ) which loads the new webpage in the current browser window. It opens up a new URL.We can use the function “cd.get ” and get the URL. Run the above program where we can see the Chrome browser launching and open it on yahoo.com IEDriver: As the name suggests it is for InternetExplorer. After creating the object and running the program, we will get an exception like “The path to the driver executable must be set by the webdriver.ie.driver system property”.Now we also need to download an exe file.Go to download session in seleniumhq.org and scroll down where we find IE Driver link and click on it and it will reside to next page from here we can download based upon our operating system, as shown in the below image.What ever be the operating system, whether it is 32xbit or 64xbit, we can download the same file. Open the downloaded folder and extract it, after extracting we will get “ieDriver” file. Now no need of double click on iedriver file, all we need is to set the System property known as “webdriver.ie.driver” and we have to give the path of  ie exe file. As java is a case sensitive language, make sure that “webdriver.ie.driver” is in lowercase. Now we need to give object reference as “IEDriver ” so that we can use the features of IEDriver object.Inside the documentation of selenium, we find WebDriver interface. Inside this interface, we see a function get( ) which loads the new webpage in the current browser window. It opens up a new URL.We can use the function “ie.get ” and get the URL. Run the above program where we can see the IE browser launching and open it in yahoo.com Launching Browsers Dynamically Let us Create New Class “Launch Browsers” Let us build a Testcase. Now our requirement is that we have a parameter called browser. If we write parameter as “Mozilla”, then the script we write in testcase should run in Mozilla browser. If we write a parameter as “Chrome”, it should run on chrome. Later on, we read this parameter from an excel file (xls) or any other file like property file, xml file. If our browser is Mozilla then below script should execute on Mozilla. If the browser is Mozilla then we want to launch the FirefoxDriver and take this FirefoxDriver to launch our desired website. In the above example, we keep on repeating the line to launch any website like fd.get(“http://gmail.com”). Later on if we want to click on a link in firefox then we need to write the code for each browsers separately. To overcome this, we use a concept called Interface reference points towards the class implementing the interface. WebDriver   d = new FirefoxDriver( ); WebDriver   d1= new ChromeDriver( ); Webdriver is an Interface and FirefoxDriver, ChromeDriver, IEDriver are implementing that Interface. Here d1 is  pointing towards chrome, so we can make d1 point towards FirefoxDriver as well , because the reference of the webdriver interface can point towards any implementing class or we can make d1 point towards InternetExplorerDriver as well, like shown below. d1 = new FirefoxDriver( ); d1 = new InternetExplorerDriver( ); So in the beginning of the program we can write WebDriver driver  =  null; Here Null means that driver is not pointing anywhere. So based on our choice, we can make driver point towards FirefoxDriver (or) ChromeDriver (or) InternetExplorerDriver as shown in the below program. Initially driver is “null”. Based on the options, driver will be initialized and we can give the command driver.get(“http://gmail.com”); All the driver classes will have same set of functions coming from WebDriver Interface, so “get” function will be there in all the driver classes. From the above program, we can launch the browser dynamically and we have to write a single script after launching the browser to interact with the browser. We do not need to write browser specific script. The reasons are : firstly all the drivers have same set of functions and secondly, the driver can point towards any of the driver classes like ChromeDriver, IEDriver. Selenium RC and WebDriver What is Firefox profile Let’s take an example where we have a PC at our place, being shared by two people. If the first person opens the PC and goes to Firefox, then firefox should get opened and it should have 1st person set of settings, his own set of bookmarks, his own set of plugins installed inside it. If a 2nd person opens PC and goes to Firefox, he should have his own set of settings, his own set of bookmarks, his own set of plugins. This concept is know as Firefox Profile. Importance of Firefox profile First where selenium launches Firefox, we write- driver  = new FirefoxDriver( ); Selenium will create its own profile and launch the browser. That profile is created programmatically by selenium and it gets destroyed when the script stops. Creating Profile manually on our PC Go to Firefox browser -> Go to File option and select Exit to close the firefox from the Exit menu, we should not close the firefox from the (x) option on the top as shown in below image. Go to windows session and type “firefox.exe -p profilemanager”. Copy the command and it will open the window as shown below. Click on Create Profile and give name as Selenium_Mod11. Click on the Finish button and click Start Firefox button where a new firefox browser will open up and this firefox browser will be like freshly installed firefox on our machine. It will have no bookmarks, no plugins, no history etc. Go to Firefox browser and bookmark the page as shown below Create a New Class -> Selenium_Profiles Run the program where it will open Firefox browser with Google Bookmark as shown in below image Close and Quit Difference driver.quit( ): It will end selenium session and close all browsers in the current session. Suppose we go to a website and click on a link, that link will open in new pop-up and if we fire driver.quit( ), then selenium will close all the browsers and end the selenuim session. driver.close( ): It won’t end selenuim session, but it closes the browser on which current focus is there. Importing Webdriver documentation in eclipse. Go to seleniumhq.org –> Go to download session and click Javadoc link and copy the URL. “http://seleniumhq.github.io/selenium/docs/api/java/index.html” and go to the project -> Right click and go to Properties->Go to Java Build Path and expand the link and click on the Javadoc location: (None). Click on Edit button and paste the URL and remove index.html and click on validate button and click OK button. Webdriver Desired Capabilities Class It helps us understand Selenium, and under which circumstances the script should run. Below example shows how we should run script on Mozilla with Javascript enabled on a windows platform.  
Rated 4.0/5 based on 20 customer reviews
About SELENIUM WEBDRIVER-3

Why WebDriver-3? In present market we have a to... Read More

Selenium And Its Salient Features

Selenium is an open source web app automation tool by ThoughtWorks (IT outsourcing company). It has 4 components. Out of which one component i.e. Selenium Remote Control was developed by a Jason Huggins team in 2004. It was primarily developed in DHTML/Javascript when they were working on time and expense application written in Python programming language. Later, Simon Stewart has developed a new component that is called as Webdriver in 2006 to overcome the disadvantages faced in Selenium Remote Control. And post that Selenium Remote Control and Webdriver were merged together and developed Selenium Webdriver. They have named this tool as Selenium based on a chemical element in Chemistry which is used to destroy Mercury chemical element.  Mercury tool which is now called as UFT was the most popular automation tool. Selenium has 4 different components that is: Selenium IDE (Integrated Development Environment) Selenium 1.0 (Also called as Remote Control) Selenium 2.0/3.0 (Also called as Webdriver) Selenium GRID Latest version of selenium is 3.4.0 which can be downloaded from http://www.seleniumhq.org/download/ Selenium supports multiple operating systems, multiple browsers and multiple languages. It gives you flexibility to choose the language in which you have expertise. Following is the list: Multiple Programming Languages : Java, Python, PHP, Ruby, Perl, JavaScript Multiple Operating Systems : Android, iOS, Windows, Linux, Mac, Solaris Multiple Browsers : Chrome, Internet Explorer, Edge, Opera, Safari etc Selenium Tool is known for its performance and execution speed. Let’s discuss about the different components of Selenium: 1)Selenium IDE : It is a record and play tool and a plugin of firefox. This plugin is used to create prototypes of tests. Following are the features of this tool: Easy to install Test Scripts are created by just click on record button Can record, edit and debug scripts Simplest way to learn Selenium syntax. Test Scripts can be imported in multiple languages like Python with Remote Control, Java with Webdriver, Java with Remote Control, Ruby with Remote Control etc This plugin can be downloaded from following URL: https://addons.mozilla.org/en-US/firefox/addon/selenium-ide/ 2)Selenium 1.0 (Remote Control) : This was the first component developed in Selenium Suite. Selenium became famous because of this component. It works in following manner: 1) Using this component, we write test scripts which interacts with Selenium Remote Control Server. 2) Server interprets the code and converts it into javascript and further injected into the browsers. 3) Javascript gets executed at the browser and response is sent back to the server which forwards it to the user. There were many drawbacks in this tool that is: Confusing commands. Remote Control Server acts as a mediator which makes its execution slower. Use of Javascript Selenium Webdriver (2.0/3.0) : After Selenium RC, Webdriver has come which make its architecture more simpler. Now, there is no server. Test Scripts interact directly with the browser. The execution is much faster compared to Selenium Remote Control. Selenium Commands were segregated in different classes which become easy for end user to remember and to implement. Last year, Selenium has launched a new version that is 3.0 which is much lighter than Selenium 2.0. There are not much change done which impact the end user but multiple were done at the backend. Syntax for loading Firefox has been changed to following: System.setProperty(“webdriver.gecko.driver”,”path to gecko driver”); Webdriver driver = new FirefoxDriver; Selenium Gecko Driver can be downloaded from following URL, the latest version for Gecko Driver is 0.16.1: https://github.com/mozilla/geckodriver/releases Selenium GRID : It is used for parallel testing. This component enable us to execute automation framework on different machines placed at different location. However, all the machines should be connected on a Local Area Network. It can be used with Selenium Remote Control as well as with Selenium Webdriver. Please note that Selenium Remote Control classes have been deprecated now. So, we couldn’t use this component with Selenium Remote Control.
Rated 4.0/5 based on 20 customer reviews
Selenium And Its Salient Features

Selenium is an open source web app automation tool... Read More

How To Become A Front-End Developer

Before jumping into the field of web development, one must know the difference between the front-end and the back-end of web development. Front-end deals with the client side of the web—that is, what the client sees. Front-end web development is the practice of developing websites with the help of languages such as HTML, CSS, and JAVA SCRIPT. These languages help in the development of web applications and websites, so that the user can efficiently interact with. There are various challenges associated with the front-end development. The major challenge is to adapt with the ever-changing tools and techniques needed to develop the applications and website. Learn HTML and CSS There is no other way around it; you will have to learn HTML and CSS. These are the basic footsteps that need to be taken in order to start your journey with front-end development. There are a lot of websites available online that help you to get started with front-end development, the major being Coursera and Udacity. Also while learning HTML and CSS, one need to start mixing up things and try to build user interfaces and try to improve on them. Keep Reading There is no limit to what you can do with the front-end of a web application. You will develop a lot of skills by reading stuffs online and practicing those things. There is always something you can learn no matter how talented you are, so keep digging and reading stuff to become the developer you wish to become. Remember, Things Take Time No one can achieve great things in a go. Always remember to acquire a new skill that requires time and patience. There will be times when you would feel it’s not worth the time or there would be times you feel low, but it’s only those times to test your strength to face those difficulties. And trust us, if you don’t give up, you will one day come out as a great front-end developer. Remember, There is More to Front-End Development than Building Websites Once you have started developing websites with the help of HTML and CSS, you must understand it’s not the end of front-end development; there are a lot more to the front-end development, making websites interactive with the help of JavaScript. And queries require a great time and you will need a lot of time in getting familiar with those. Front-end development is just a piece in a puzzle, so one needs to put the pieces in perfect place to solve the puzzle. So it needs much practice in getting the front-end communicating with the back end of the websites. Dig Deep about Your Tools In your way across developing front-end of web applications and websites, the only need is to get familiar with the toolkits they are using, the framework on which they decide to work upon. The use of tools with which you are familiar and studied about, one can enhance the quality of their web applications and websites to a great level and also achieve a great flow with their websites and web applications. Keep Digging into Frameworks Once you have become familiar with HTML, CSS, and JavaScript, you need to start digging into various frameworks, with which you can work in developing your front-end projects. But trust us; don’t stick to one framework, which will limit your capabilities. Keep digging into various frameworks and learn about the best practices in order to get the workflow you need with your web applications and websites. Start Contributing to Open-Source Projects Start developing for open-source projects. Developing for open-source projects will improve your portfolio as a developer to a great level. No matter how great a portfolio is, there is a room for development and contributing to such open-source projects, which will improve your knowledge as well as your reach amongst the community of developers. Summing It Up Trust us, the path to become a front-end development training helps you to achieve. Because of the rapidly-evolving web universe, one needs to change with the changing needs of the modern world. Therefore, to become a successful web developer, you will need to adapt the changes in the industry, and the quicker you adjust with the changing trends, the successful your path as a front-end developer will be.
Rated 4.0/5 based on 20 customer reviews
How To Become A Front-End Developer

Before jumping into the field of web development, ... Read More

Web Development Using PHP And MySQL

PHP (or PHP Hypertext Preprocessor) is a server-side scripting language that is used to create dynamic web pages that can interact with databases. It is a widely-used open source language that is specifically used for web application development and can be embedded within HTML. Why PHP? The distinguishing feature of PHP is that the scripting code is executed on the server, which generates HTML that is sent back to the client. The client receives the result of executing the script without knowing the underlying code. Developers can configure the web server to process all the HTML files (containing the PHP script). PHP course is easy to learn for any newcomer, but also offers advanced programming features. Using PHP with a database system PHP, as a scripting language, is popular among web developers because of its ability to interact with database systems including Oracle and MySQL. This article discusses the use of PHP scripting language with the MySQL database. Any website can require a variety of data or information to display and to retrieve them from the database. This can include display of a simple list to the running of the website based on data stored in the database. Listed below are some examples where PHP and MySQL can be used together: • Digital Ad banners, where the PHP script can be used to retrieve a digital banner from the database, which then selects a random banner from its table records and sends it back to the calling script. The PHP script can also maintain a count of banner views and clicks from the website. • Internet forums or digital boards, which use PHP and MySQL to store and retrieve user messages. • Website designing, where the design of an entire website can be changed using a couple of PHP scripts, instead of changing and uploading each web page. The PHP script can access the MySQL database to retrieve all information about the web page. Setting up the MySQL database The procedure of setting up the MySQL database varies according to the host. Every database would require a user name and password, in order to access the database. Database administration can be done using PHP scripts or using a program like PHPMyAdmin. The next step is to create the database tables for storing the website information. Creating a database table using PHPMyAdmin is also simple. Alternatively, one can create and configure the entire database using the following PHP script: CREATE TABLE tablename { Fields } Where the Fields are coded as fieldname type(length) extra_info Example: first varchar(15) NOT NULL The following command is used in the PHP script to connect to the MySQL database: mysql_connect(localhost,$username,$password); where: • localhost is the server address on which the web site is running, • $username is the user name for the database access • $password is the password for the database access Executing PHP commands After configuring and connecting to the MySQL database, you can start executing PHP commands on the server. Following are the 2 methods of executing a PHP command: • Entering the command in PHP using the following syntax: Mysql_query($query) This form of command can be used to repeat the command simply by changing the variable. • Defining the command as a variable. The result of the operation will be assigned to the variable. Data input and output Inserting data using PHP is identical to the procedure of data input using HTML pages. The advantage of using PHP is that the script does not need to be changed for each new piece of input data. Users can also input their own data on the web page. Following is an example of an HTML page with textboxes that can be used to enter data in a form: Alternatively, you can use variables to input information into the database. Example: $first=$_POST[‘first’]; $last=$_POST[‘last’]; $phone=$_POST[‘phone’]; $mobile=$_POST[‘mobile’]; $fax=$_POST[‘fax’]; $email=$_POST[’email’]; $web=$_POST[‘web’]; … $query = “INSERT INTO contacts VALUES (”,’$first’,’$last’,’$phone’,’$mobile’,’$fax’,’$email’,’$web’)”; mysql_query($query); This script is saved in the insert.php file, which can be called from the HTML form. Using this method, data entered in the web page form is stored in the defined variables, which are then passed to the PHP. To display (or output) the entered data using PHP, you can use the following MySQL command with the result assigned to the variable. $query=”SELECT * FROM contacts”; $result=mysql_query($query); PHP provides 2 submission methods, GET and POST to get the data submitted by the form into your PHP script. GET method displays the variables and the data in the page address, while they are invisible in the POST method. For example, a script can be created that will display different web pages depending on the clicked link. yourpage.php?user=david (to show David’s page) yourpage.php?user=tom (to show Tom’s page)
Rated 4.0/5 based on 9 customer reviews
1755
Web Development Using PHP And MySQL

PHP (or PHP Hypertext Preprocessor) is a server-si... Read More

Some Things To Ponder On – Intro To Programming 101

A lot of people are getting into programming these days because they love computers, coding and want to make a career in the IT industry. A career in the tech industry is diversified and rewarding, and thus, a good programmer can quickly move up the corporate ladder. This post is helpful for any novice who is interested in coding. Adapt your style How to learn a new language? Should I read the documentation? Should I join a Bootcamp? Should I watch video lectures? Should I ..?? These are the most common questions beginners face, and different people give different answers. You might ask “What should I do?” or “Whom should I listen to?”. Well, the simple answer is to try different ways of learning and choose the one that suits your style and stick to it. The way you learn might or might not vary from language to language but irrespective of that, it will be your unique way of learning. This will give you accelerated growth in the long run. Learn by doing! Reading books, watching video tutorials and not writing a single line of code can be the most ineffective way to learn a new language. And cramming is no better! There are various resources online which follow the “learn by doing” concept. You can also learn by solving programming challenges in online forums or, you can try to build an app or website from scratch and learn the language on the fly! Write neat code! Generally, most of the beginners, especially those who are self-taught tend to write messy code, that is, without proper formatting and commenting. There is no foresight nor a designed plan or algorithm in mind. After getting comfortable with at least one language, while working on a project, one should first develop the algorithm before starting the implementation and make sure that the language is utilised to its maximum efficiency. Most beginners tend to ignore the naming conventions, which is a very serious problem. It is important to give proper names to functions, it not only makes your code understandable for other programmers but also helps a lot during debugging and testing phases. Also, many times, functions can become huge unintentionally which complicates the code drastically. Recursion should be used wherever applicable. Languages, frameworks and platforms When starting to learn web programming, you hear lots of new terms. You might hear people talk about platforms and frameworks. The answer to which framework you choose would depend on the answer to the questions like “Which platform should I use? PHP? JAVA? .NET?” A platform is an underlying service provider. A Framework is a set of predefined functions and classes which a developer uses for faster development. According to Wikipedia, “A web framework (WF) is a software framework that is designed to support the development of web applications including web services, web resources and web APIs. Web frameworks aim to alleviate the overhead associated with common activities performed in web development. “ It is very important to understand the need and use of many general purpose frameworks. For example, Django and Ruby on Rails are popular frameworks for the server side whereas AngularJS is widely used in the client-side. Apart from these, there are different types of languages; HTML is a Markup language and CSS is a styling language. Javascript is used widely for frontend development. “Is Javascript the same as Java?” is a very common question as well, it’s like comparing oranges to apples, they are very different. So before going into web development it would be better to understand these concepts in detail for the long run. Learn to debug! Developers often tend to stare at their code for hours trying to find errors in logic or syntax but good developers usually get the desired code quickly by using debuggers properly. Not using a debugger can be as bad slow you down. When you use a debugger, you get additional information on what might have gone wrong other than your basic thought process. It’s like thinking out of the box! I am not biased about code editors( Nah, Sublime Text is the best!) Use your search engine! It doesn’t matter whether you use Google, Yahoo or Bing as your search engine but whatever it is, try searching your doubts as much as possible. It is very easy to debug errors, just copy the error text and there is a 9/10 chance that someone might have already asked the same question in popular forums like Stackoverflow. There is nothing wrong in searching the web for language syntax, developers all over the world refer to the code documentation often, in fact, it is excellent practice to be up to date! Wrapping up Never forget that everyone’s different. Choose the languages you like and work on projects that excite you. Do not write messy code and learn by coding. The more you code, the better coder you will become. Understand concepts thoroughly before jumping into detail. Make the best use of IDE’s, debugging tools and your search engine. Remember: while( ! ( succeed = try() ));
Rated 4.0/5 based on 20 customer reviews
Some Things To Ponder On – Intro To Programming ...

A lot of people are getting into programming these... Read More