Programming

Free Tutorials to Learn Java

Learn Java.

Learn JavaJava is a very successful object-oriented programming language created by James Gosling from Sun Microsystems (Sun) in 1991. Java has been developed with the target to write a program once and then run the  same program on multiple operating systems. The first publicly available version of Java (Java 1.0) was released in 1995. Sun Microsystems was acquired by the Oracle Corporation in 2010.  In 2006 Sun started to make Java available under the GNU General Public License (GPL). Oracle continues this project called OpenJDK.

Java is defined by a specification and consists of a programming language, a compiler, core libraries and a runtime environment (Java virtual machine)  The Java platform is usually associated with the Java virtual machine and the Java core libraries.

Recently I noticed some interesting online courses on Java and I suggest a few ones.

A Video to Learn Java in 30 Minutes

It is an interesting Video that describes the main concepts of the Java Programming Language,

Books to Learn Java

There are many good books to learn Java and I have selected a few ones from Amazon UK

 

 

References

A Computer Science Portal for Geeks
Introduction to Java programming – Tutorial
Free Tutorials Download – Java
Programming E-Books by Bruce Eckel
M256 – Software development with Java – Open University Course
How to Learn Java Programming

 

Be the first to comment - What do you think?
Posted by Mario1 - 16/08/2017 at 3:01 pm

Categories: Computer Languages, Programming, Training   Tags:

IBM i Modernisation Issues

IBM i Modernisation

 

Modernization-Redbook-231x300In recent years there have been frequent discussion on the IBM i modernisation issue concerning the user interface, the database and programming.

Recently I noticed an interesting article published on the MC Press online website and I have re-published it below for your convenience

Modernization  on the IBM i: Getting Started

Written by Brian May Monday,

23 February 2015 00:00

Modernization. Everyone is talking about it. Everyone wants it. But we cannot always agree on exactly what it is. It can mean a few different things, depending on your needs and environment. This of course leads to confusion for those who need it most.

 

In addition to being a Modernization Specialist for a software vendor, I am a member of the team of authors who created the IBM Redbook Modernize IBM i Applications from the Database up to the User Interface and Everything in Between. This is an issue that even we experts were forced to overcome. We came together to write a book about modernization. After hours of deliberation on the table of contents of the book, it was apparent that it would be difficult to fit the needed content in one book. Even the title of the book is difficult to fit on a page!

 

The enormity of the topic and the plethora of options available can often discourage IBM i shops from even beginning their quest for application modernization. Fortunately, a few simple tips and clarifications will smooth out the start of your journey.

 

Modernization essentially falls into three major categories, each of which has its own unique challenges.

Database

The database is the foundation of your application. Your company’s data is its lifeblood. This is arguably the most important part of your application to modernize, but it is often the hardest to sell to management. The reality is, if you have done it correctly, the vast majority of your users will never know it was done. The application may run faster and have fewer errors. Your development staff will spend less time “fixing” data and will be able to implement some changes in a timelier manner. These added efficiencies are just harder to quantify.

 

Before embarking on your database modernization project, here are a few things to add to your to-do list.

 

Study General Database Concepts

As IBM i developers, most of us have developed our own style of database design over the years. Remember, our system has had a relational database for a long time. That long and rich history has given us some habits that were well-founded at one time but now are no longer the best design choices. I recommend finding a good book on database design and doing some reading.

 

Learn about database normalization and form. Chances are you are not normalizing your database as much as you could or should. This is important for making your applications as agile as possible. Normalization will eliminate data duplication and help you maintain data integrity.

 

Also learn the proper SQL terms for database elements. This will help you when looking for resources online or when talking to database experts from other platforms. Below is a short table to help you associate common IBM i terms with SQL terms.

 

IBM i Term

SQL Equivalent

Library

Schema

Journal

Log

Physical File

Table

Logical File

View

Keyed Logical File

Index

Record

Row

Field

Column

 

There are more books available on the topic of SQL and database design than anyone could ever read. Chapter 8 of the modernization Redbook is a good place to start.

 

Learn DDL

Take the time to learn how to create your database files using SQL instead of DDS. You have used DDS for years. You are comfortable with it and know everything about it. You can create files faster because of your familiarity with it. So why change now?

 

Whether you realize it or not, DDS is limiting you. Think about it. When is the last time you remember IBM adding an enhancement to DDS? If you watch IBM’s announcements, you will see enhancements added to DDL, the subset of SQL used to define tables, constantly. New data types and functionality are added at least twice a year in Technology Refreshes. This is where IBM is spending its development dollars with regard to database enhancements. SQL is the industry standard, and you should be embracing it.

 

Luckily, there are tools to assist you, and resources on the topic abound. Chances are you have i Navigator on your computer. The database section contains tools to help you take an existing file and generate the DDL needed to create an identical file as well as a wizard to let you define a table in DDL using a point-and-click interface.

 

Understand Triggers, Constraints, Indexes, and Referential Integrity

You need to understand these database features in order to make your application more data-centric. There are entire articles and books on these topics, so there is no need to rehash them here. Through doing your research mentioned above, you should have learned the basics of these concepts. Moving business rules and validations down into your database will simplify your application code and enforce these rules even when data is introduced from outside sources. This is key to having a solid foundation.

 

Pace Yourself

Do not try to do it all at once! Start small by only creating new tables using SQL DDL. Then move forward slowly. Chances are you will not be designing a new database from the ground up very often, so you need to integrate what you have learned in a methodical way. Again, the modernization Redbook is a great place to start.

 

Code

When it comes to code modernization, your options are virtually endless. Should you stay with the programming language you are currently using? Should you move to PHP, Java, .Net, Ruby, Node.js, or whatever the language du jour is? The truth is I can’t make that decision for you. Every programming language has advantages and disadvantages. I believe that modern RPG is still the best language for business applications, but it’s certainly not the only choice. No matter which language you use, the following tips can be applied.

 

Write Modular Code

Modular coding is essential. In the RPG world, this means embracing ILE and service programs. In other languages, this will mean object-oriented programming. Coding in a modular fashion can be a big step for IBM i developers. RPG applications are historically monolithic and use a top-down methodology. Learning to design your applications and break them into logical units will make you a better coder in any language. Start by reading articles about ILE, service programs, and subprocedures. This information will be invaluable.

 

Learn and Use the Latest Features

Be sure that you are familiar with the enhancements added to your programming language in each release, and try to incorporate them into your applications. Those features were added because they were deemed useful. You should at least understand them well enough to know if they are useful to you. Even though you may be using the latest version of a language (RPG IV, for example), if you are not using its features, you are not getting the benefits of the language.

 

Experiment

Coding should be fun. You should experiment while you learn. All too often, readers will tell me they haven’t tried to modernize their code because they have not determined what method is best. There is no best method! You will never know what method is best for you until you try a few. Just because you tried to code a certain way when you started modernizing does not mean you should be stuck with that decision if it is not working for you. Plan for time to redesign. If you try to get things perfect before you begin, you will never begin.

 

User Interface

Your user interface is the face of your application. This is what your user base and management interact with every day. You can have the most advanced database and coding methodologies available under the covers, but if you use them to drive a 5250 session, your users will instantly disregard it as outdated. Many great custom-built applications are replaced by inferior packaged software because the UI is better looking and easier to use.

 

The new users coming into your company were raised in an age of social media, smartphones, and instant access to any content they want. Can a green-screen deliver that? Simple things like checkboxes, dropdowns, and autocomplete are not only pretty “bells and whistles.” They are essential ease-of-use features that users expect. Proper use of such elements can reduce costs by streamlining data entry and reducing training time.

 

Here are some considerations when modernizing your user interface.

 

Ease of Input

The key to a successful application is to make it as simple to use as possible. Reducing manual input should be priority one. With the influx of mobile touchscreen devices, many of your users will not have a real keyboard.

 

This is very different from the traditional IBM i application developer’s mindset. We have always strived to speed data entry by keeping the user’s fingers firmly planted on a keyboard. In the past, heads-down data entry was the norm and speed was essential. Users navigated screens repetitively and could hammer out data with super efficiency.

 

With the increase of data exchange via EDI, FTP, e-commerce, and web services, the need for massive heads-down data entry is on a steady decline. Usability should be our focus now instead of data entry speed. On a touchscreen device, you are actually slowing your user down every time you require something to be typed. That is where graphical elements excel. When your input method is a touchscreen, you expect to be able to interact with your application with a simple touch.

 

Do not forget about keyboards completely, though. Be sure to test to ensure that tabbing through elements flows as expected.

 

Variety of Access

Your application needs to be available on a plethora of devices and operating systems. Enterprises are becoming more diverse in their hardware every year. A Windows-based desktop is not the only device you must consider any more. Companies are issuing desktops and laptops running Linux. Apple devices are showing up outside of the art departments. More and more companies are deploying tablets on sales and manufacturing floors.

 

All of the devices should be able to access your company’s data. You can develop and maintain applications for each of these possibilities separately, but that is very inefficient. This diversity has led to the vast popularity of web-based interfaces. All of these devices in the wild have web browsers installed. Having a web-based interface gives your application the flexibility to support them all. I do not recommend device-specific applications unless there is a technical need to do so.

 

Learning Curves

With the move to a graphical interface, the options available to you can be daunting. While I do recommend to everyone to learn basic HTML, JavaScript, and CSS, becoming an expert in all areas of web development takes time. For this reason, I recommend that IBM i developers evaluate tools to assist them in creating user interfaces. Many third-party packages are available for giving IBM i applications better user interfaces. New technologies like Rational Open Access RPG Edition can reduce learning curves even further for RPG developers.

 

I highly recommend that you try a few different options. Download a trial of a couple of commercial offerings. Try building a UI yourself from the ground up with raw HTML, JS, and CSS. Have a look at some of the frameworks available. All of these options have merits. Finding the right fit for you will require some hands-on time.

 

Wrapping Up

If I have not answered all of your questions about modernization, good! That was never my intent. But now you at least have a starting point. I do strongly suggest getting a copy of the modernization Redbook, and not just because I wrote a few chapters in it. It is a great source of knowledge on a very wide range of topics related to modernization.

 

The most important thing to remember is this. The only true mistake you can make with regard to application modernization is doing nothing. It is important to have information, but not at the expense of experience. You will learn as you go and change your mind on aspects of your plan. That is just the nature of modernization. You are not just modernizing your applications. You are also modernizing your skills. It is good to have a plan, but do not over-plan. Never limit yourself to only what you planned. How can you plan for what you didn’t know you didn’t know?

 

In the end, there are no magic bullets. Modernization is a process. It will take work, but the rewards are well worth the investment.

About the Author:

Brian May

Brian May, an IBM Power Systems Champion and Modernization Specialist for Profound Logic Software, devotes the majority of his time to assisting customers with their modernization efforts. He frequently writes and speaks on topics related to RPG, JavaScript, and IBM i Modernization. Brian recently contributed his time and expertise to the new IBM i Modernization Redbook.

 

References

IBM i Modernisation Strategies

IBM i Web Enablement: Five Decisions to Make Before You Start

Webgate400

Rapidly Deliver PHP Web Apps on IBM i

IBM System I Application Modernization: Building a New Interface to Legacy Applications (Redbook)

 

 

Incoming search terms:

  • ibm i modernization

Be the first to comment - What do you think?
Posted by Mario1 - 28/02/2015 at 5:19 pm

Categories: AS/400 Software, Programming   Tags:

Video Courses on Programming Languages

Video Courses

Linux Certification
I recently received an email from Deitel Buzz about Video Courses on Programming Languages and I have copied below for your convenience.

Deitel Buzz Online: 75% off Videos at Udemy!

Udemy has 75% off videos right now, but I am not sure for how long. Get them while you can!

Java, 2/e, Part 1: http://bit.ly/1EDFvKV
Java, 2/e, Part 2: http://bit.ly/1zoyMn7
Java, 2/e, Part 3: http://bit.ly/1x0IT2g
Swift, Part 1: http://bit.ly/1sMfMKP
Android, 2/e, Part 1: http://bit.ly/1x0ILzE
Android, 2/e, Part 2: http://bit.ly/1xyTr7N
C# 2012, Part 1: http://bit.ly/1EDF9nG
C# 2012, Part 2: http://bit.ly/14lXZET
C# 2012, Part 3: http://bit.ly/1pYMHAg
C++: http://bit.ly/1u9yJKf
JavaScript: http://bit.ly/115F8vW
C# 2010, Part 1: http://bit.ly/1xnWMsF
C# 2010, Part 2: http://bit.ly/1qHViSy
C# 2010, Part 3: http://bit.ly/1oVv6bC

iOS 8 for Programmers: An App-Driven Approach with Swift is nearly complete. It has reviewed strongly and the early access version on SafariBooksOnline.com is already up to #21 out of over 38000 books!

We’re also working hard to complete Swift for Programmers by the end of the year. More details to come!

 

 

 

Be the first to comment - What do you think?
Posted by Mario1 - 15/11/2014 at 1:33 pm

Categories: Programming   Tags:

PHP eLearning Courses

PHP eLearning Courses

I recently noticed some interesting PHP eLearning Courses proposed by  iProDeveloper and I have copied some information below for your benefit.

iPro Developer eLearning Events

Upcoming PHP eLearning Courses – Enroll Now

iPro Developer is pleased to offer two exclusive technical training events that will give you a deep-dive into PHP.

PHP brings a whole new scripting solution to the IBM i/System i platform. As a simple and easy to use tool, PHP enables the developer to deliver robust browser based solutions with minimal coding.

Whether you are just starting out with PHP or you’re a seasoned veteran, iPro Developer is bringing you essential online training that will help you boost PHP performance and help you increase productivity.

Join our renowned experts for these exclusive training events, and get all the benefits of an in-person class without the hassle and expense of travel. Each course is recorded so you can attend live and then review the material on your own time.

Enroll now to take advantage of early bird discounts and get the most value for your education dollars.

PHP102 for the RPG Programmer with Mike Pavlak
Tuesdays & Thursdays, December 3-19 at 12 pm ET
Join Mike Pavlak for part 2 of his PHP for RPG programmers eLearning series. This course focuses heavily on transaction processing. With in-class examples and homework assignments, you will gain powerful knowledge of the PHP transaction processing sequence.
Price: $429 $364 Through November 26th – You Save $65!

Let your PHP Apps Fly on IBM i: High-Performance PHP with Alan Seiden
Tuesday, December 10th at 11 am, 1 pm, and 3 pm ET
In this one-day training course, Alan Seiden teaches you how to ensure performance for your PHP applications that run on IBM i (or that connect to IBM i). You’ll get little-known tips and tricks to help identify bottlenecks and trouble-shoot your applications. You’ll leave this course brimming with new ideas to make your applications fly.
Price: $150 $120 Through December 3rd – You Save $30!

Need assistance? Contact our customer service team to find out about purchase order and invoicing options. Group discounts and multi-course discounts are available upon request. Send an email to service@iprodeveloper.com or call 800-650-1804 or 913-967-1719.

Click here to see our full eLearning catalog >>>.

Notes

If you want to learn more about PHP, you could consider reading some good book such as the following  available at Amazon UK

 

 

Incoming search terms:

  • NULL

Be the first to comment - What do you think?
Posted by Mario1 - 21/11/2013 at 4:32 pm

Categories: Computer Books, Computer Languages, Computer Software, PHP, Programming, Training, Uncategorized   Tags:

The PHP Object Oriented Model

PHP Object Oriented Model

I found an interesting article on the PHP Master website about the PHP Object Oriented Model and I have re-published it below for your convenience.

 

Lesser-Known “Features” of PHP’s OO Model

 

Lesser-Known Features of PHPs OO Model

 

The vast majority of today’s applications written in PHP are object-oriented, and in general the core OOP concepts are pretty well understood by PHP developers. This article pushes the boundary of your understanding and shows you some tricks, or potential pitfalls depending on your perspective, of OOP in PHP.

Inheritance for Interfaces and Traits

Let’s begin in familiar territory: interfaces. An interface in PHP allows us to define a contract that any object implementing this interface must itself implement. But did you know that interfaces can also inherit other interfaces, and that either the parent or child interface can be implemented by a class?

Consider this code, which defines an interface, another which extends it, and a class that implements the child interface:

01 <?php
02 interface Reversible
03 {
04     function reverse($target);
05 }
06
07 interface Recursible extends Reversible
08 {
09     function recurse($target);
10 }
11
12 class Tricks implements Recursible
13 {
14     public function recurse($target) {
15         // something cool happens here
16     }
17
18     public function reverse($target) {
19         // something backward happens here
20     }
21 }

I’ve defined an interface named Reversible, and another one named Recursible that extends it. When I implement Recursible in the Tricks class, both the recurse() method from the Recursible interface and the reverse() method from the Reversible interface must be present.

This is a useful technique to employ when an interface will contain methods that are used across one set of classes, but another set of classes need these and an additional set of methods. You can make a composite interface as shown here rather than implement two interfaces.

Traits offer a similar pattern. If you haven’t had an opportunity to use traits yet, these look like classes and can contain complete method definitions that can be applied to any class(es) in your application, without the need to inherit from a common location. We’re often taught that it’s better to move code to a common parent class than to copy-and-paste between classes, but sometimes classes aren’t related and the inheritance is false. Traits are a great feature because they allow us to re-use code even where objects aren’t similar enough to justify inheritance.

Let’s look at a simple trait example. (Warning: the zany naming scheme from the previous example is still in evidence.)

1 <?php
2 trait Reversible
3 {
4     public function reverse($target) {
5         return array_reverse($target);
6     }
7 }

The syntax for traits looks very much like a class, and indeed traits can contain both properties and methods – including abstract methods. These are then applied in a class that brings the trait into it by using the use keyword… or they can also be applied to a trait, as we see here:

01 <?php
02 trait RecursivelyReversible
03 {
04     use Reversible;
05
06     public function reverseRecursively($target) {
07         foreach($target as $key => $item) {
08             if(is_array($item)) {
09                 $target[$key] = $this->reverseRecursively($item);
10             }
11         }
12         return $this->reverse($target);
13     }
14 }

Now we’ve got a trait that uses another trait and adds a method of its own. This method calls a method in the first trait. At this point, we can apply the trait to the class, and since the traits contain the feature I want to illustrate here, the class doesn’t contain anything else.

1 <?php
2 class Mirror
3 {
4     use RecursivelyReversible;
5 }
6
7 $array = [1, "green", "blue", ["cat", "sat", "mat", [0,1,2]]];
8 $reflect = new Mirror();
9 print_r($reflect->reverseRecursively($array));

If you run the code, you’ll see that not only does the top-level of the array get reversed, but that PHP also drills into and reverses all of the child elements as well.

How Private is a Private Property?

So you thought that a private property was only accessible from within the current object? Not quite true! Actually the restriction is only on class name, so objects of the same class can access one another’s private properties and methods. To illustrate this, I’ve created a class with a private property and a public method that accepts an instance of the same class of object as an argument:

01 <?php
02 class Storage
03 {
04     private $things = [];
05
06     public function add($item) {
07         $this->things[] = $item;
08     }
09
10     public function evaluate(Storage $container) {
11         return $container->things;
12     }
13 }
14
15 $bucket = new Storage();
16 $bucket->add("phone");
17 $bucket->add("biscuits");
18 $bucket->add("handcream");
19
20 $basket = new Storage();
21 print_r($basket->evaluate($bucket));

You might think that $basket would not have access to $bucket‘s private data, but actually the code above works just fine! Asking whether this behavior is a gotcha or a feature is like asking if a plant is a flower or a weed; it depends on your intention and perspective.

What Does an Abstract Class Look Like?

An abstract class is usually thought of as being an incomplete class; we only define partial functionality and use the abstract keyword to stop anything from attempting to instantiate it.

1 <?php
2 class Incomplete
3 {
4     abstract public function notFinished();
5 }

If you try to instantiate Incomplete, you’ll see the following error:

PHP Fatal error: Class Incomplete contains 1 abstract method
and must therefore be declared abstract or implement the
remaining methods (Incomplete::notFinished) in /home/lorna/
phpmaster/oop-features/incomplete.php on line 5

The message is self-explanatory, but now consider another class:

1 <?php
2 abstract class PerfectlyGood
3 {
4     public function doCoolStuff() {
5         // cool stuff
6         return true;
7     }
8 }

It’s a perfectly valid class aside from the abstract keyword. In fact, you can mark any class as abstract if you wish. Other classes can extend it, but it can’t itself be instantiated. This can be a useful device for library designers who want developers to extend their classes rather than making use of them directly. Zend Framework has a rich tradition of abstract classes for exactly this reason.

Type Hints Don’t Autoload

We use type hints to ensure that an incoming parameter to a method meets certain requirements by giving the name of a class or interface that it must be (or be related to). However, PHP does not call the autoloader if the class or interface given in a type hint hasn’t been declared yet; we’ll just see the missing class declaration error.

01 <?php
02 namespace MyNamespace;
03
04 class MyException extends \Exception
05 {
06 }
07
08 class MyClass
09 {
10     public function doSomething() {
11         throw new MyException("you fool!");
12     }
13 }
14
15 try {
16     $myclass = new MyClass();
17     $myclass->doSomething();
18     echo "that went well";
19 }
20 catch (Exception $e) {
21     echo "uh oh... " . $e->getMessage();
22 }

The class name in the catch clause is actually a type hint, but since we didn’t indicate that the Exception class was in the top-level namespace, PHP thinks we mean \MyNamespace\Exception which doesn’t exist. The missing class doesn’t raise an error, but our exception now misses the catch clause. You might expect that we’d see a missing \MyNamespace\Exception message, but instead we get the unspeakably ugly “Uncaught Exception” error:

Fatal error: Uncaught exception 'MyNameSpace\MyException'
with message 'you fool!' in /home/lorna/phpmaster/
oop-features/namespaced_typehints.php:11

This behavior makes complete sense if you think about it – if something named in a type hint isn’t already loaded, then by definition the incoming parameter cannot match it. I had to make this mistake myself before I really thought about it, and it’s just a typo! If you catch \Exception rather than just Exception, this works as I had originally intended.

And Finally

The finally clause is a feature worth knowing about that was recently introduced in PHP 5.5. If you’ve used other programming languages with exceptions then you may have seen this construct before. There’s only ever one try block, we can have as many catch blocks as we please, and from this version of PHP we can also add a finally.

Here’s the previous code example again, with finally added:

01 <?php
02 namespace MyNameSpace;
03
04 class MyException extends \Exception
05 {
06 }
07
08 class MyClass
09 {
10     public function doSomething() {
11         throw new MyException("you fool!");
12     }
13 }
14
15 try {
16     $myclass = new MyClass();
17     $myclass->doSomething();
18     echo "that went well";
19 }
20 catch (Exception $e) {
21     echo "uh oh ... " . $e->getMessage();
22 }
23 finally {
24     echo "move along, nothing to see here";
25 }

The finally clause will always happen, regardless of whether we reached the end of the try block, entered any of the catch blocks, or if there are more uncaught exceptions on the way. In this example, the output from the finally block actually appears before the error about the uncaught exception because it’s not uncaught until we’ve ended the try/catch/finally section.

Conclusion

Certainly some of the examples I’ve shown here are quite far-fetched, and hopefully you wouldn’t run into them every day, but I do think it’s worth knowing what edge cases look like so that you can design and build systems correctly. Understanding the building blocks can certainly help us to get our jobs done and to debug problems quickly, and I love sharing ideas to make that easier!

What gotchas have you found in PHP? Please share with the rest of us in the comments section.

Image via Fotolia

Lorna Jane Mitchell is a PHP consultant, developer, and author based in Leeds, England. Code is her passio and she loves to share her experiences with others, so much so that as well as her books (PHP Master published by Sitepoint and PHP Web Services published by O’Reilly), she also created the PHP course on OOP for Learnable. Lorna writes regularly for her own site lornajane.net about all kinds of topics, mostly technical ones. When she’s not writing either code or words, you can usually find her cooking or eating; Lorna loves food as much as she loves code!

Visit Site

Notes

There are many good books on Object Oriented PHP and you will find a good selection at Amazon UK by clicking the links below:

 

==> PHP Object Oriented Model

Be the first to comment - What do you think?
Posted by Mario1 - 02/08/2013 at 4:30 pm

Categories: PHP, Programming, websites   Tags:

An Introduction to Test Driven Development

Test Driven Development

Test-driven_development

Test-driven_development (Photo credit: brunobord)

According to Wikipedia Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: first the developer writes an (initially failing) automated test case that defines a desired improvement or new function, then produces the minimum amount of code to pass that test, and finally refactors the new code to acceptable standards. Kent Beck, who is credited with having developed or ‘rediscovered’ the technique, stated in 2003 that TDD encourages simple designs and inspires confidence.

Test-driven development is related to the test-first programming concepts of extreme programming, begun in 1999,but more recently has created more general interest in its own right.

By using a Test Driven development approach, the developer starts with  use cases and user stories to cover the requirements and exception conditions, and can write the test in whatever testing framework is appropriate to the software environment. The next step is to write some code that causes the test to pass. The new code written at this stage is not perfect, and may, for example, pass the test in an inelegant way. That is acceptable because later steps improve and hone it.

When the tests are passed successfully the programmer can be satisfied that the code reflects the requirements and can start cleaning up as necessary.

 

Test Driven Development in PHP

There is an interesting tutorial that explains how to use Test Driven development in PHP and you can read by accessing the link below:

==> Test-Driven Development in PHP: First Steps

 

Test Driven Development in Other Languages

Test Driven development is an approach that can be used in any language. Recently I read a discussion on Linkedn about using it with RPG and Peter De Campi suggests the following approach:

 I sit amongst a bunch of Java developers, all using junit. I’ve tried RPGunit but I wan’t quite comfortable with it. So what I’m doing now is programming with modules and creating programs (or service programs) from those- I this is what we should be doing anyway.

But the beauty of these modules is that you can also link them into a “test” program and this test program injects the module with any test conditions you want to test.

Now this is a non trivial task but when it’s done you can change the module, recompile/update the test program, run a test cycle. Then recompile/update the main program.

This is what I’m doing more and more now. And it’s working quite well

 

Some Books on Test Driven Development

If you want to leanr more about test driven development, you could consider some of the following books sold by Amazon;

Enhanced by Zemanta

Be the first to comment - What do you think?
Posted by Mario1 - 14/06/2013 at 4:08 pm

Categories: Computer Software, Programming   Tags:

How to Learn PHP

Learn PHP

Php programming

Php programming (Photo credit: Wikipedia)

PHP is a popular scripting language that can be embedded into HTML and used to develop web applications.

Currently PHP and Java are probably the most on demand computer languages. Generally PHP is the preferred choice if one wants to work on the web whereas Java is preferred for desktop applications, enterprise applications and mobile apps.

I made some investigations on good options about how to learn PHP and you will find below some results of my investigations.

 

Learn PHP with PHP Online Tutorials

 

I found some good online tutorials such as the following:

 

Learn PHP on Good PHP Books

 

There are many good books on PHP and you will find below an initial choice from Amazon UK:

 

 

PHP Magazines

Another way to learn PHP or improve your PHP expertise is to read some magazine dedicated to PHP such as the following:

 

 

Open Source ERP Systems written in PHP

Enhanced by Zemanta

Be the first to comment - What do you think?
Posted by Mario1 - 26/05/2013 at 4:02 pm

Categories: Application Servers, AS/400 Software, Computer Books, Computer Hardware, Computer Languages, Computer Software, Database, Ebooks, ERP, ERP applications, IDE, Information Technology, Linux Sofware, Operating Systems, PHP, Programming, Training, Uncategorized, Utilities, websites   Tags:

Nearly 75% Of All Smartphones Sold In Q1 Were Android

Android Smartphones

I noticed an interesting article on TechCrunch about Android Smartphones and I have re-published it below for your convenience.

Nearly 75% Of All Smartphones Sold In Q1 Were Android, With Samsung At 30%; Mobile Sales Overall Nearly Flat: Gartner

Ingrid Lunden

samsung_logo_crown-300x268

Gartner has just released its Q1 figures for mobile handset sales, and the key takeaway is that Android continues to steal the show, led by handset maker Samsung. Google’s mobile platform now accounts for nearly 75% of all handset sales, a jump of almost 20 percentage points on a year ago, and equating to 156 million devices sold in the three-month period. Smartphones sales grew by 63 million units to 210 million for the quarter, making up nearly half of all mobile phone sales overall, at 425 million. With the number of mobile handset sales up by a mere 0.7% on a year ago, it’s clear that higher-end devices are very the much growth engine for the mobile industry at the moment.

Here’s a breakdown of some of the more interesting figures from Gartner.

Although Samsung does not release exact sales figures for its devices, Gartner estimates that the Korean giant is the biggest of them all: it accounted for almost 31% of all smartphones sold in the period, with Apple in number-two with 18%. It’s quite a change from last year, when the two were nearly level, with just 5 percentage points separating them. The widening gap, and Samsung’s growth, will continue into the quarter ahead, it seems, led by the popularity of the company’s newest flagship model.

“We expect the new Galaxy S4 to be very popular despite being more of an evolution than a truly revolutionary device compared to the S3,” writes Anshul Gupta, principal research analyst at Gartner.

On the other hand, the fact remains that at least some appear to still be holding out for the next iPhone rather than going for the iPhone 5; and Apple meanwhile is still holding back from releasing new, low-cost models that might help it along more in emerging markets and compete more comprehensively against the huge range of Android devices out there.

The gap between the two biggest brands and number three continues to be a big one, with Samsung very much taking the lead here. “There are two clear leaders in the OS market and Android’s dominance in the OS market is unshakable,” Anshul writes.

Together, Apple and Samsung accounted for 49 million handset sales. This is down by 1.1 million from a year ago, and as the smartphone market continues to grow, the players who are vying to be the next big challengers continues to churn. LG swapped places with Huawei, and is currently at number-three at 4.8 million units (with a strong showing from some of its newer 4G handsets and its lower-cost smartphone range). Huawei’s 4.4 million, however, shows that it continues to press ahead, as does fellow Chinese handset maker ZTE, which rounds out the top-five:

gartner smartphone vendors q1 2013

Samsung, unsurprisingly, is also leading in the overall mobile category, which also counts sales of lower-end feature phones. Its share there is now 23.6%, topping 100 million units.

Just as Samsung is widening the gap against Apple in smartphones, it’s doing the same with Nokia in the overall rankings. The Finnish giant is still number-two but with a 14.8% share, a drop of 5 percentage points on last year.

mobile phones overall gartner q1 2013

Looking at mobile platform prominence in smartphones, Android’s current 74.4% market share is nothing short of astounding in terms of its increase, particularly considering that at this point there is no sign of it slowing down.

Gartner’s numbers, it should be noted, are some 10% higher than those from Kantar Worldpanel Comtech that were released at the end of April: a sign of the margin of error between different analysts’ estimates resulting from different counting methods. Here are yet more numbers from IDC, which claims that smartphones outshipped feature phones, and Canalys, which was also more bullish than Gartner on smartphone numbers at a 300 million estimate.

Back to Gartner: the 156 million units sold in the quarter is actually almost double what was sold in the same period a year ago. Android is without a doubt riding the very crest of the smartphone wave: Gartner points out that smartphones accounted for 49.3% of sales of mobile phones worldwide, up from 34.8% in Q1 of 2012, and 44% in the fourth quarter of 2012.

Apple continues to grow but at a slower pace, managing to increase its share by a “mere” 5 million. BlackBerry (still called RIM by Gartner: hello rebranding!) continues to drop, indicating that at least so far, its big BB10 attack has yet to bear significant fruit. Microsoft is showing a respectable doubling of growth to nearly 6 million units, but that is pretty tiny when you look back to Android and its 156 million. It shows that a significant amount of work remains to be done by Microsoft and partners like Nokia if it expects to get anywhere within spitting distance of Android, or even Apple.

Still, the cautionary tale of Symbian remains a sign of how fast a handset maker can fall from grace. It’s now at 0.3 percent of sales now that Nokia has discontinued its production of the once market-leading devices — although its share was falling fast even before that.

gartner q1 2013 smarthones

Gartner points out that Asia is currently the market driver for mobile phone sales worldwide, accounting for more than half of all sales, with China remaining the biggest single market.

“More than 226 million mobile phones were sold to end users in Asia/Pacific in the first quarter of 2013, which helped the region increase its share of global mobile phones to 53.1 per cent year-on-year,” writes Anshul Gupta, principal research analyst at Gartner. “In addition, China saw its mobile phone sales increase 7.5% in the first quarter of 2013, and its sales represented 25.7 per cent of global mobile phone sales, up nearly 2 percentage points year-on-year.”

Be the first to comment - What do you think?
Posted by Mario1 - 14/05/2013 at 5:00 pm

Categories: Application Servers, AS/400 Software, Computer Books, Computer Hardware, Computer Languages, Computer Software, Database, Ebooks, ERP, ERP applications, IDE, Information Technology, Linux Sofware, Operating Systems, PHP, Programming, Training, Uncategorized, Utilities, websites   Tags:

New CrunchU Computer Courses

CrunchU  Computer Courses

CrunchU is the result of a partnership between TechCrunch and Udemy which initially offer 30 computer courses including some courses from DeitelBuzz ! You can view the full list of courses at:

==> http://techcrunch.com/crunchu/

I have re-published it below the official TechCrunch CrunchU announcement.

  • Main Event Page

Crunch, Crunch, CrunchU: Course Registration Is Now Open

Print

That crunching sound you hear is software eating the world, and TechCrunch is always looking for ways to pull a chair up to the feast. For example, we have CrunchBase for startup data and CrunchBoard for jobs, and once upon a time there was  CrunchPad, too. Not everything works out, but today with high hopes we are launching CrunchU, which is a collection of 30 online courses that we are offering to TechCrunch readers in partnership with Udemy, a San Francisco-based startup dedicated to “democratizing education by making top quality content from the world’s experts dramatically more affordable for anyone, anywhere.”

We like the sound of that, because we all have a lot more to learn, and keeping it real and affordable is what education should be all about. Our initial course line-up includes offerings from TechCrunch friends, like 500 Startups’ Dave McClure on “Raising Money for Startups” and Eric Ries on “The Lean Startup,” as well as experts Gagan Biyani on “Introduction to Growth Hacking” and Russ Fradin on “Startup Hiring.”

We have a certain bias for startups, no surprise, but there is lots of other brain candy in the course mix too, like starter courses on Android and iOS, Ruby and jQuery, as well as gamification, programming for non-programmers, SEO, and in case you just want to have fun, digital photography.

Our  plan is to introduce new courses each quarter, based on what we learn about TechCrunch readers’ likes and dislikes. We also have the option of creating courses on our own, with the help of Udemy’s awesome course-creation tools. If you have an idea for a course, or want to teach one yourself, learn more here.

So if you have a minute, check out the CrunchU course catalogue and find some educational itch you want to scratch. The tuition sting is teeny, but it will be automatically discounted 50% off from today until May 18.

 

Note:

For a limited time, DeitelBuzz offer big discounts on many of their LiveLessons computer courses. These discounts are for only the first 100 sold of each course. If you click the link and it’s not discounted, the discounts are gone for that course! For links, please visit:

==> Deitel LiveLessons Discounts

Be the first to comment - What do you think?
Posted by Mario1 - 09/05/2013 at 5:12 pm

Categories: Application Servers, AS/400 Software, Computer Books, Computer Hardware, Computer Languages, Computer Software, Database, Ebooks, ERP, ERP applications, IDE, Information Technology, Linux Sofware, Operating Systems, PHP, Programming, Training, Uncategorized, Utilities, websites   Tags:

The Desktop Linux – Is it Winning?

The Desktop Linux

Gnome 3 Snapshot

Gnome 3 Snapshot (Photo credit: Wikipedia)

Linux has always been strong about choice and offers a great variety of Linux desktops such as Gnome, KDE, Ubuntu Unity and many more.

There have been many discussions about replacing Windows with Linux and about toppling  Microsoft’s desktop monopoly, but Desktop Linux has never reached a widespread user base.

However I recently read an interesting article on the Infoworld.com website about how a desktop revolution has already begun with mobile devices and applications. I have republished the article below for your convenience.

The Linux desktop is already the new normal

We’re so busy seeking release from Windows that we overlooked all the ways Linux had already freed us

By | InfoWorld

Follow @webmink

A debate is smoldering yet again in the Linux community as prominent figures debate whether it’s time to give up hope on the “year of the Linux desktop” ever coming or whether the advent of Android is actually its fulfillment. Problem is, it came and it’s been here a while, but we haven’t even noticed. We just didn’t know what it would look like.

I realize that statement flies in the face of conventional wisdom. Last year, Miguel de Icaza’s controversial post “What killed the Linux desktop” famously claimed that the opportunity for a Linux-based desktop to dominate the market has passed and is now an unachievable dream. He pointed to what he sees as a series of problems within the culture of Linux development.

At the heart of his argument is the idea that overly frequent updates led to a lack of compatibility, which in turn put off third-party developers. This is not to say he’s surrendered to Windows; he recently explained why he uses a Mac. Now that the world has seen the example of the Apple OS X App Store, products that struggle with compatibility issues feel like a big step backward, regardless of any great features.

Chromebook to the rescue
Meanwhile, Linus Torvalds has a different avenue for hope: Google’s Chromebook. This actually is a Linux desktop computer with only one application, the Chrome browser. The hardware itself is perfectly capable of running other Linux distributions — which is what Torvalds does — but out of the box, it’s running a stripped-down, single-function Linux system that’s easily maintained and secured centrally.

I’ve been using Chromebooks personally and for my business for the last six months, and I can state firmly it’s the Linux desktop I’ve been waiting for. I tried many other approaches, but found every other Linux desktop solution required too much effort to maintain. The Chromebooks (and one Chromebox) we have in the office deliver all the functions we need, without becoming the security nightmare you expect of Windows — and without the constant patronizing lock-in that’s manifesting itself on the Mac these days and without becoming the new hobby we’d expect from a raw Linux distro.

The reason it’s worked so well may surprise you. It works for me and my business because — wait for it — Linux has already won on the desktop.

The Linux desktop is called “the browser”

While we were all waiting for the open source community to topple Microsoft’s desktop monopoly by replacing the operating system, we missed the real revolution. There’s still plenty of money in both operating systems and in desktop apps, and Microsoft will be milking that legacy monopoly for a good while. It’s certainly been the target of competitive attention from open source software; indeed, the productivity suite now epitomized by LibreOffice has over its long history done an effective job in opening up that part of Microsoft’s monopoly.

But most enterprise expenditure doesn’t happen on the desktop. Maybe it’s software Stockholm Syndrome making us all love our captor, but the focus on desktop applications, coupled with the idealistic expectation that Windows will be displaced, has led many to overlook or even dismiss the category where Linux actually has taken over the desktop.

That’s in the browser. Think about it: When did a new process or service you wanted to use last come as a Windows application download? When it did, what actually was that application? An increasing number of desktop applications are just containers for HTML5 Web apps. The real powerhouse behind those apps is usually Linux, accessed over the Internet, along with other elements of the modern LAMP stack. In a very real sense, the applications many use daily for email, documents, presentations, and more are Linux desktop applications. A fanatical obsession with replacing Windows made for interesting discussion, but while that debate was happening, all the work on the desktop moved inside the browser window.

In turn, that desktop revolution has fueled — and been fueled by — Linux in portable devices. In that space, Linux is definitely winning globally, both by powering multiple device platforms such as Android and Kindle and by powering many of the applications found on those devices. Tools like PhoneGap allow the developer to take the same Linux-powered back end and use it for both desktop/browser apps and for device-specific apps. The result? Linux is everywhere, even on iOS.

It was natural to assume the wedge to displace Microsoft’s desktop monopoly would be something that did the same thing. Futurists have long made their predictions by describing the present wearing Spandex. When it comes along, the new reality often looks different from the future we expected. So we still have no flying cars, food still doesn’t come in pill form — and the Linux desktop is actually running in your browser.

The year of the Linux desktop came long ago and we missed it. We were expecting it to displace Windows; instead, it has displaced the Windows desktop application, powered the reinvention of the mobile market, and in the process done more for us all than the revolution we expected could ever have delivered.

This article, “The Linux desktop is already the new normal,” was originally published at InfoWorld.com. Read more of the Open Sources blog and follow the latest developments in open source at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on

 

 

 

Enhanced by Zemanta

Be the first to comment - What do you think?
Posted by Mario1 - 07/05/2013 at 1:51 pm

Categories: Application Servers, AS/400 Software, Computer Books, Computer Hardware, Computer Languages, Computer Software, Database, Ebooks, ERP, ERP applications, IDE, Information Technology, Linux Sofware, Operating Systems, PHP, Programming, Training, Uncategorized, Utilities, websites   Tags:

Next Page »