Enriching your Views

Embed Size (px)

DESCRIPTION

When creating the view-part of MVC, you are always using different components to build up the view. This session will show you two components of the Zend Framework to enrich your views, including Zend_ProgressBar and Zend_Tag_Cloud. You will learn about what these components can do and how to use all their features.

Citation preview

  • 1. Enriching your Views Ben Scholzen Game Developer Gameforge Productions

2. What we will cover

  • Zend_ProgressBar
  • Applications

3. Structure 4. Usage in the Web and on the ConsoleZend_Tag_Cloud

  • Definition of Tags and Tagclouds

5. Advantages of Zend_Tag_Cloud 6. Basic usage 7. Zend_ProgressBar 8. What Zend_ProgressBar does

  • Takes absolute progress data

9. Calculates relative progress data 10. Display the progress

  • Sort of ...

11. Sample output for end-users

  • Web

12. Console 13. Where you can use progress bars

  • Sending newsletters

14. Upload 15. Download 16. Processing files 17. Any other long-running tasks 18. Structureof Zend_ProgressBar

  • Zend_ProgressBar
  • Managing absolute values

19. Session management Zend_ProgressBar adapters

  • Receiving relative calculated values

20. Output of the data 21. Incremental example

  • Useful for fixed-growing values

22. Differential example

  • Useful for variable-growing values

23. The three standard adapters

  • Zend_ProgressBar_Adapter_Console
  • For output on the console

Zend_ProgressBar_Adapter_JsPush

  • For sending data in a single connection

Zend_ProgressBar_Adapter_JsPull

  • For sending data in multiple connections

24. The console adapter

  • Style of the output can be completly customized

25. Elements can be arranged

  • Bar

26. Percent 27. ETA 28. Text Output stream can be changed 29. Finish action can be choosen

  • Newline

30. Remove progressbar 31. Do nothing 32. The JavaScript Push adapter

  • Only requires a single connection
  • A separate one when doing uploads

33. A combined one when sending e-mails Used with either or 34. Drawbacks

  • Some antivirus software blocks the receiving until the connection was closed

35. The JavaScript Pull adapter

  • Runs in multiple separated connections

36. New data are received via JSON 37. Update interval can be freely choosen 38. Drawbacks

  • Depending on the update interval, many connections can slow down the server

39. On the browser side

  • Calculated data are received by the browser
  • Current

40. Max 41. Percent 42. TimeTaken 43. TimeRemaining 44. Text Output is created with HTML / CSS / JavaScript

  • JavaScript Frameworks (jQuery, Dojo, etc.)

45. Manually 46. Zend_Tag_Cloud

  • Zend_ProgressBar

47. Zend_Tag_Cloud

  • Was sind Tags

48. Vorteile von Zend_Tag_Cloud 49. Benutzung Fragen & Antworten 50. What are tags and tag clouds?

  • Tags
  • Catchwords / Notes

Tag clouds

  • Visualization of information

51. Collection of tags 52. Alphabetically sorted 53. Tags are visualized according to their weight 54. How a tag cloud looks like 55. Why should I use Zend_Tag_Cloud?

  • Interface / class for single tags
  • Setting and getting the title

56. Defining custom parameters Class for collections of tags

  • Simple iteration through all tags

57. Automatic callculation of logarithmical weight Class for output of tag clouds

  • Comes with a standard decorator for HTML
  • Can be completly customized

Allows output on any media Decorators and tags can be added either via configuration or programtically 58. A simple example 59. And what you get 60. What we got so far

  • Within a few minutes we created:
  • Multiple tags with weight and links

61. HTML output 62. Style the nasty list 63. The final result 64. Summary Questions?

  • Zend_ProgressBar

65. Zend_Tag_Cloud

  • Was sind Tags

66. Vorteile von Zend_Tag_Cloud 67. Benutzung Fragen & Antworten 68. Where to go from here

  • Zend Framework documentation http://framework.zend.com/manual/en/zend.progressbar.html http://framework.zend.com/manual/en/zend.tag.html

69. Follow me Blog: http://www.dasprids.de 70. Twitter: dasprid 71. Rate this talk http://joind.in/talk/view/634 72. Thank you!