Monday 27 August 2012

Java MySQL JSON Display Records using Jquery.

This is the continuation of my previous Java tutorial Insert Records into MySQL database using Jquery, now I want to explain how to convert records data into JSON data format and display JSON data feed using Jquery. It's simple just follow few steps with Eclipse IDE, hope you understand the Model View Controller pattern Thanks!

Java JSON Jquery Display Records
Read more »
Share:

Getting rid of the main()

Did you know that your JavaScript has a main() method? That’s right – the outermost scope of any script is the main method. It does not have an official method declaration but it is the same thing for all practical purposes.

<script>
window.alert('Greetings from the main method.');
</script>


Ok, so JavaScript has a main method, just like most languages. But Misko, you ask, what is your point? My point is that you need a main method for assembling, initializing and starting your application, but it is causing you problems and you need to get rid of it.

The application assembly is something which grows organically on any project. Usually with lots of global state and singletons. No one really sits down and designs the main() method. It is an afterthought. On a large project the main() method becomes a pit where initialization happens, but no one knows why it happens in any particular order. Worse yet, everyone is afraid to change it, since it usually results in catastrophic failure.

But the main() method has one more property, and that is that it can not be prevented from running. This usually spells doom for testing your application, since loading the JavaScript into the test harness results in running application at best, and horrible exceptions at worse. Neither of which is helpful for writing unit tests.

AngularJS applications have no main methods. Or rather AngularJS main methods are empty of logic and behavior, they only contain code declaration. This means that AngularJS applications are more testable and do not have a Gordian Knot of dependencies in the main() method.

But that begs the question: How do AngularJS applications assemble themselves? The answer lies in a declarative approach to application assembly. Rather than having a main() method responsible for instantiating and assembling all of the components of the application, an AngularJS application components simply declare which other components they need. Dependency injection system can then instantiate any components and all of its dependencies on as needed basis. Let’s look at an example:

angular.app('example').
service('wheels', Wheels).
service('engine', Engine).
service('car', Car);

function Wheels() {
// do something
}

function Engine() {
// do something
}

function Car(wheels, engine) {
// Look, car automatically gets wheels and engine.
}


The last piece which is missing is knowing which component to instantiate first to get the application going. This component is usually a root controller, and AngularJS knows how to instantiate it because ng-controller directive triggers its instantiation like so:

<script>
// $window is MyApplication controller dependency
// Asking for $window in the constructor declares it as dependency
MyApplication = function($window) {
$window.alert('hello world');
}
</script>
<body ng-controller="MyApplication">
<!-- Asking for MyApplication causes it to be instantiated with all of its dependencies --!>
</body>
Note: Alternatively $route service or a run block of a module can perform the same role.

The best part of this is that AngularJS applications are practically begging to be unit tested. Loading the JavaScript in the test harness just specifies the definitions of components, but it has no side effects. Instantiating any one component in a test is easy, one simply ask the dependency injection system for it. But the best part is that in unit-tests we can override the components and definitions and replace them with test friendlies making unit-testing AngularJS application a cinch.
Share:

Wednesday 22 August 2012

1AVStreamer HD Broadcasting Desktop or Webcam (Giveaway)

One of the important workaround which I come across in my daily work is to share my PC with my clients and colleagues who work in different geographic location. In order to share your desktop over the internet one needs an high quality of desktop sharing application supporting for audio/video and same time managing a good bandwidth in streaming the desktop for any broadcasting software’s.1AVStreamer is a PC software useful to stream video and audio from any source of your PC to the internet in real-time
Read more »
Share:

Tuesday 21 August 2012

Create Animated GIF Banner using Photoshop.

In this post I want to explain you how to create an animated banner image Adobe Photoshop. This is very useful for banner advertisements, you can present more information in single image. Few days back I had designed a banner for Wall Script, please take a look at the top banner just below menus. Just follow the below steps and design your own banners.

Animated GIF Banner Photoshop
Read more »
Share:

Tuesday 14 August 2012

Your excuse to buy a PlayStation

Today, Sony and YouTube announced the YouTube app for the PlayStation 3.  It's a beautiful, immersive experience designed for the PS3 platform.  And the amazing part is that it is built with AngularJS.


If you have a PS3, you can check it out in the PlayStation Store.  Otherwise, this is a perfect excuse to buy one and see what AngularJS is capable of.

We've invited the YouTube developers to present at a future AngularJS meetup and share their development experiences with you.  Until then, enjoy the app!
Share:

Sunday 12 August 2012

Facebook Wall Script 5.0

Very Long days back I released a commercial script called Wall Script 4.0, It is a rich Jquery, PHP, MySQL application and collaboration of 9lessons blog tutorials. After many requests I’m releasing Wall Script 5.0 with extra features like friend relations, user authentication, news feed with existing Wall Script 4.0 features and implemented latest Jquery plugins Don't miss the video demo. Thanks

Facebook Wall Script
Read more »
Share:

Monday 6 August 2012

Upload Files to Amazon S3 using PHP

Are you looking for Amazon S3 bucket file upload from your web project using PHP technology, if yes take a quick look at this post demo. Amazon S3 is the best option to reduce the bandwidth cost as well file load time. Upload functionality is the most sensitive part in web project, one small mistake hackers will upload miscellaneous files. If you are connect with Amazon S3 you will be safe side.

Upload Files to Amazon S3 PHP
Read more »
Share: