ncoded contact information

website design services web design service online shops service optimisation and seo services graphical design servicese-commerce service search engines services graphic design services

Archive for the ‘Programming Tutorials’ Category

Strategies for Web 2.0 Applications

Posted by admin On June - 7 - 2009

We came across an excellent article about strategies for Web 2.0 application.

In summary the points raised were:

1. Start with a simple problem (during analsis)

2. Create prototypes as early as possible.

3. Get people on the network to work with the product prototype rapidly and often.

4. Release early and release often.

5. Manage your software development and operations to real numbers that matter.

6. Gather usage data from your users and input it back into product design as often as possible.

7. Put off irreversible architecture and product design decisions as long as possible.

8. Choose the technologies later and think carefully about what your product will do first.

9. When you do select technologies, consider current skill sets and staff availability.

10. Balance programmer productivity with operational costs.

11. Variability in the productivity amongst programmers and development platforms each varies by an order of magnitude.

12. Plan for testing to be a larger part of software development process than non-Web applications.

13. Move beyond traditional application hosting.

14. Build upon an Open Source foundation.

15. Consider mobile users as important as your regular browser customers.

16. Search is the new navigation, make it easy to use in your application.

17. Whenever users can provide data to your product, enable them.

18. Offer an open API so that your Web application can be extended by partners around the world.

19. Make sure your product can be spread around the Web by users, provide widgets, badges, and gadgets.

20. Create features to make the product distribute virally.

21. The link is the fundamental unit of thought on the Web, therefore richly link-enable your applications.

22. Create an online user community for your product and nurture it.

23. Offer a up-to-date, clean, compelling application design.

24. Load-time and responsiveness matter, measure and optimize for them on a regular basis.

25. User experience should follow a “complexity gradient.”

26. Monetize every page view.

27. Users’ data belongs to them, not you.

28. Go to the user, don’t only make them come to you.

29. SEO is as important as ever, so design for it.

30. Know thy popular Web standards and use them.

31. Understand and apply Web-Oriented Architecture (WOA).

32. Online products that build upon enterprise systems should use open SOA principles.

33. Strategically use feeds and syndication to enable deep content distribution.

34. Build on the shoulders of giants; don’t recreate what you can source from elsewhere.

35. Register the user as soon as possible.

36. Explicitly enable your users to co-develop the product.

37. Provide the legal and collaborative foundations for others to build on your data and platform.

38. Design your product to build a strong network effect.

39. Know your Web 2.0 design patterns and business models.

40. Integrate a coherent social experience into your product.

41. Understand your business model and use it to drive your product design.

42. Embrace emergent development methods.

43. It’s all about usability, usability, and usability.

44. Security isn’t an afterthought.

45. Stress test regularly and before releases.

46. Backup and disaster recovery, know your plan.

47. Good Web products understand that there is more than the Web.

48. Look for emerging areas on the edge of the Web.

49. Plan to evolve over time, for a long time.

50. Continually improve yourself and your Web 2.0 strategies.

  • Share/Save/Bookmark

When creating or modify databases and their tables, it is essential that you understand how the tables relate, or how you want them to relate. Normalization is the process whereby tables are optimised via referential integrity to remove duplication, redundancy, and errors.

Two key ways to represent the fields, tables, and relationships is via ER (Entity-Relationship) Diagrams and Data Dictionaries. The ER Diagram is just that; a diagram (similar to a UML Class or Object diagram) which shows the tables and their data fields, as well as the relationship between tables.

The Data Dictionary is listing of the formatting  used to create you tables - eg relationships are viewed as Primary and Foreign keys etc. All the tables and their fields and formatting, as well as the Table Relationshops are also fully documented.

The ER Diagram is useful for taking a High Level view of the overall database including Relationships, where as the Data Dictionary is Essentially as it gives you key specific data - such as the field type, size, length, etc.

  • Share/Save/Bookmark

Create an Adobe Flex & Air Application Video Tutorial

Posted by admin On May - 15 - 2009

This is an excellent video tutorial on how to build an Adobe Flex web application (RIA). As you can see Adobe Flex and Air are the same beast, the difference being where they are aimed at, the desktop or browser flash player.

Flex is a highly productive, free open source framework for building and maintaining expressive web applications that deploy consistently on all major browsers, desktops, and operating systems. While Flex applications can be built using only the free open source framework, developers can use Adobe® Flex® Builder™ software to dramatically accelerate development.

http://www.adobe.com/products/flex/media/flexapp/

  • Share/Save/Bookmark

PHP 5 Web Page Scraping

Posted by admin On May - 15 - 2009

If you want to scrape or mash-up elements from an external website then take a look at the following code.

As you can see it fetches the document (web pages) and then iterates around via DOM and SimpleXML.

$html = @DOMDocument::loadHTMLFile($url); // fetch the remote HTML file and parse it (@ suppresses warnings).
$xml = simplexml_import_dom($html); // convert the DOM object to a SimpleXML object.
foreach ($xml->xpath('//a') as $node){ // run an XPath query and iterate through the array of results
  print (string) $node . "\n"; // casting to string produces the text contents of the node.
  print $node['href'] . "\n"; // attributes of the node are accessible as array attributes.
  print $node->asXML() . "\n\n"; // asXML() produces the whole XML string.
}

Note: if namespaces are involved, use

$xml->registerXPathNamespace('NAMESPACE_PREFIX', 'NAMESPACE_URI');

and

$xml->xpath('//NAMESPACE_PREFIX:ELEMENT')

replacing the text in capitals as appropriate.

  • Share/Save/Bookmark

How to Embed Flickr SlideShows

Posted by admin On May - 15 - 2009

If you want embed Flickr slideshows into your website then take a look at the following code which allows you to do this.

IFrame solution:

<iframe align=center src=http://www.flickr.com/slideShow/index.gne?user_id=2468@N00&tags=NframeBorder=0 width=500 scrolling=no height=500></iframe>

Object Solution:

<object type="text/html" data="http://www.flickr.com/slideShow/index.gne?user_id=2468@N00&tags=N" width="500" height="500"> </object>

Where ever you want the slideshow to appear just place the following html code; obvoulsy you will also have to change the user_id to the correct one. Also if you need to resize the screenshow just update the correct paraments (arguments).

If you are using Tags, then also replace N with the correct tag that you want to use.

The following arguments (or paramenters) are also available for useage:

contacts=
text=
tag_mode=
favorites=
group_id=
frifam=
nsid=
single=
firstIndex=
set_id=
firstId=

You can get full infomation about this from the Flickr API (application programming interface).

  • Share/Save/Bookmark

PHP 5 Pagination (for multiple result pages)

Posted by admin On May - 15 - 2009

Pagination refers to spliting a number of pages using a ‘page 1 of N pages’ type menu. Pagination is the actual process of spliting the number of returned items into ‘pages’.

A very simple way to establish pagination on a website is to use the new PHP 5 function scandir() to build an array, and then use this array within a loop to build up your pagination.

You can view the code to establish this pagination functionality below:

//read all the files in a given directory into an array
$arrray_of_all_files = scandir('/directory/');

Now in most cases (linux etc) within a directory you will find system files (such as .httacess etc files). Therefore in order to only get the non-system files we will setup a condition to elminate these files.

//init new array
$files_req = array();

//only add a file if it does not begin with a dot (.)

foreach(arrray_of_all_files as $N){
	if(strpos($N,'.')!==0){
		array_push($files_req,$N);
	}
}

In order to paginate the results within the array we need to establish how many items per page we require, as well as how many pages - although this of course makes the applicability static - so in real world examples the pages would be of course be dictated by the items per page.

The main function that we use to work this out is the PHP function array_chunk(). This function is very simple and just takes two parameters (arguments) - the array you want to split and the number of elements in each section (page).

//create a multdimensional array, holding each set of elements
//eg [0] holds first set, [1] holds second set, etc.
$sets = array_chunk($files_req, 25);

Now all we need to do is interate through the array building up some pagination links - obviously the page that gets linked will need to know which set to use, and have the code to format (display) these.

$link_code_start="<a href='page.php?set=";
$link_code_finish=$i."'".">";
for($i=1; $i<count($sets)+1; $i++){
     echo $link_code_start.$i.$link_code_finish;
}
  • Share/Save/Bookmark
Website & E-Commerce Solutions


nCoded Website, IP & Content © 2003 - 2009 nCoded - All Rights Reserved - No part of this website may be reproduced without permission.