Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Kwiecień, 2011

This Week in Web – JS Videos, Mozilla, Titanium Docs, ExtSJS, django-rules

This Week in Web – JS Videos, Mozilla, Titanium Docs, ExtSJS, django-rules

Day of JS

On 27th January 2011 a conference was held at Google HQ which covered the state of Javascript both on the web and mobile platform. Six talks between 40 and 60 minutes in length were given by Javascript community leaders such as Ben Galbraith, Dion Almar, Yehuda Katz and Kevin Whinnery. MJG (the sponsor of the conference) recorded those talks and has uploaded them in high quality video format. If you have an interest in jQuery Mobile, Titanium Mobile, SproutCore, Sencha Touch or Javascript on the web in general, I highly recommend you watch these videos.

Mozilla’s JS Plans for 2011

David Mandelin, a developer at Mozilla, has written a blog post titled Mozilla Javascript 2011. In it he discusses the features and enhancements planned this year for Mozilla’s Javascript engine. These include a new debugging API (which will allow for remote debugging), performance enhancements to the garbage collector, type inference for TraceMonkey and a new JIT compiler called IonMonkey. Mandelin does a really good job at explaining each of these enhancements in simple terms (without the lingo). I personally learned alot by reading it.

TiDocs.com

ExtJS 4.0 Released

Sencha have released version 4 of their ExtJS Javascript framework. This release comes with plenty of example code which will help you get up and running quickly. Be sure to read the release notes. Some of the new features in ExtJS4 are:

  • Class system
  • Better testing, over 4000 unit tests
  • MVC application architecture
  • Faster and more modular Grid, Data and Layout widgets
  • New Charting widget

Download it here.

django-rules

django-rules is a Django authorization backend that offers a unified, per-object authorization management. It is quite different from other authorization backends in the way it lets you flexibly manage per-object permissions.

In django-rules every rule adds an authorization constraint to a given model. The authorization constraint will check if the given user complies with the constraint (e.g. if the user has the right permissions to execute a certain action over an object, etc.). The authorization constraint can be a boolean attribute, property or method of the model, whichever you prefer for each rule :)

Source: http://query7.com/this-week-in-web-js-videos-mozilla-titanium-docs-extsjs-django-rules

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Learning Python Qt Programming with PyQt & PySide

Learning Python Qt Programming with PyQt & PySide

Introduction

Qt is a cross platform application framework that is made up of not only a GUI widget toolkit, but also classes for working with OpenGL, SQL databases, threading, network protocols (HTTP, FTP, UDP, TCP) and much more. Currently Python has two separate bindings for the Qt framework: Pyside and PyQt. In this post we look at Pyside and PyQt and the resources that exist for learning them.

Pyside or PyQt?

Both Pyside and PyQt have full Python bindings for Qt 4.7 and are available for Mac, Windows and Linux. The main difference between the two is how they are licensed. PyQt is developed by River Bank Computing and is available under the GPL or a commercial license. This means that if your application is open source you can use the free GPL version, but if your application is closed source you need to buy the commercial license (350 GBP). Pyside is licensed under the LGPL so it can be used in both open and closed source applications with no cost. In addition to the standard Desktop bindings, Pyside is also available for the Maemo and MeeGo mobile platforms.

Because Pyside is a relatively young project the majority of articles and tutorials on the web are titled with PyQt. Don’t let this put you off if you intend only to use Pyside. For the most part PyQt and Pyside are API compatible and all differences between the two projects are listed on the official wiki.

Qt Designer

Qt Designer is a layout and forms GUI builder. Developers can drag and drop Qt widgets (buttons, lists, tables, menus, inputs etc.) onto a window and then resize and position them how they want their application to look. Once the GUI is designed it can then be exported to an XML dialect and loaded into PyQt or Pyside. The following tutorials are for getting started and using Qt Designer:

Learning Python Qt

An Introduction to PyQt by Mark Mruss of LearningPython is an excellent beginners introduction to PyQt. It assumes no prior knowledge of PyQt or GUI programming and walks you through creating a basic hello world window.

Jan Bodnar of Zetcode has written a great series of tutorials introducing PyQt 4. They cover menus, signals, layouts, basic widgets and concludes by writing a tetris game. Zetcode is probably the best single resource for learning PyQt as it covers much of the API. All of the tutorials are well written and have clear code snippets and screenshots to accompany each example.

PyQt By Example, by Roberto Alsina, is a five part tutorial that walks you through creating a to-do list application. It is extremely detailed and covers things like database interaction using Elixer/SQLAlchemy and designing the UI in Qt Designer. This tutorial shows you how to build a full featured GUI application using PyQt and is perfect for those who are new to Qt and have done little to no GUI programming before.

Books

There are currently two books that cover Python Qt4.X and one book that covers Python Qt2.X. GUI Programming with Python: QT by Boudewijn Rempt was written in 2001 and covers the PyQt 2.X and some 3.X bindings. Although this is outdated and not available for print anymore, it is free to read online so you may pick up some tips or tricks. Rapid GUI Programming with Python and Qt: The Definitive Guide to PyQt Programming by Mark Summerfield was written in October 2007 and covers PyQt 4.2 and 4.3. This is probably the single most useful resource as it covers the majority of the PyQt API as well as GUI programming design patterns. Summerfield has provided updated code examples from the book that are compatible with PyQt 4.7 and Pyside, they are available on the book’s website. Advanced PyQt4, by Jan Bodnar (writer of Zetcode), is a 248 page ebook that focuses on some of the lesser documented and advanced parts of PyQt. This includes graphics, layout management and model/view widgets such as QTableView, QListView and QTreeView. Although I have not read it, the summary, authors reputation and price ($23) suggests this would be a very good book to buy.

Source: http://query7.com/learning-python-qt-programming-with-pyqt-pyside

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

PHPRiot.com: Reducing a Map Path Using Douglas-Peucker Algorithm

PHPRiot.com: Reducing a Map Path Using Douglas-Peucker Algorithm

On PHPRiot.com there’s a new tutorial showing you how to use the Douglas-Peucker algorithm to make the pathing on your map the simplest possible (the fewer points the better) having serious benefits a wide range of users, most notably those on mobile devices.

When drawing a path on a map (for instance, the directions from point A to point B) it is important to consider the limitations of the device you’re drawing the path on. In this article, I will show you how to reduce the number of points in a path so the path can be displayed with minimal loss of quality on devices such as iPhone or Android-powered devices that may struggle with an extremely large set of points.

Using the GTFS service’s data, he’s been creating maps for an iPhone application. Naturally, a path with 700 points would take a lot of resources to render. Using the Douglas-Peucker algorithm he can reduce it down to a much more manageable 70 points. He explains the algorithm briefly and hows how to implement it in PHP with three classes – ShapePoint, Shape and ShapeReducer. The resulting reduced dataset is then passed directly over to a Google Maps for plotting.

Source: http://www.phpdeveloper.org/news/16274

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Voices of the ElePHPant: Interview with Elizabeth Tucker Long

Voices of the ElePHPant: Interview with Elizabeth Tucker Long

The Voices of the ElePHPant podcast has posted their latest episode – an interview with Beth Tucker Long, Editor-In-Chief of php|architect.

Cal’s “three questions” this time are related to her experience coming in to PHP and her thoughts on the community:

  • How did you get started in PHP?
  • What do you look for in authors for [php|architect]?
  • What new technology do you think will have the biggest impact on PHP developers in the coming year?

You can listen to this latest episode either using the in-page player or by downloading the mp3 directly.

Source: http://www.phpdeveloper.org/news/16273

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Symfony Blog: Symfony2: Getting easier

Symfony Blog: Symfony2: Getting easier

On the Symfony blog there’s a new post about how Symfony2 is “getting easier” thanks to some recent changes with improved error handling and simpler configuration options.

With the release of the first beta approaching fast, our main focus has switched from adding new features to polishing existing ones. [...] Recently, Ryan and I have spent our time tweaking error messages, simplifying the code and the configuration, adding more documentation, and making things more consistent throughout the framework. The goal is to ease the learning curve and make things that people will need on a day to day basis simpler.

The changes they’ve made include three updates – better Twig error messaging, better configuration error messaging and some helpful changes to the Doctrine configuration to allow for auto-mapping of connections when the traditional one-database setup is used.

Source: http://www.phpdeveloper.org/news/16272

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Hannes Magnusson’s Blog: There is an app^Wppa for that

Hannes Magnusson’s Blog: There is an app^Wppa for that

Hannes Magnusson, in an effort to make it easier for developers to play with the latest shiny features of the current PHP development, has created a PPA for the latest daily status of the PHP project’s trunk line of code.

There is still no public “development preview” or alpha release, but that doesn’t mean we can’t play around with it, report bugs, ensuring our apps still properly work with it etc etc etc. It is however a bit annoying needing to “go old-school” and fetch a snapshot and build it yourself though.

If you’d like to try it out for yourself (the generated Ubuntu packages), you can get more information over on the Launchpad page for the project. As always, feedback is welcome on the PHP internals list about your experiences.

Source: http://www.phpdeveloper.org/news/16271

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Ibuildings techPortal: DPCRadio: Technical Writing

Ibuildings techPortal: DPCRadio: Technical Writing

On the Ibuildings techPortal they’ve posted a new episode of their recordings from the Dutch PHP Conference 2010, DPCRadio – a recording of Elizabeth Naramore’s session Technical Writing.

If you’ve had an idea for writing a blog post or article, but you’re not sure where to start, this talk is for you! Maybe you’ve had difficulty effectively documenting your code, or communicating your ideas to non-techies. This talk will help you, too! In this fun and informative session, we’ll discuss the basics of writing and clear communication through the written word. We’ll also talk about strategies for keeping your writing interesting and informative at the same time. Finally, we’ll discuss resources for improving your writing skills in the future.

You can either use the in-page player to listen or you can download the mp3 to listen wherever you’d like.

Source: http://www.phpdeveloper.org/news/16270

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Popular Posts for the Week of 04.29.2011

Site News: Popular Posts for the Week of 04.29.2011Popular posts from PHPDeveloper.org for the past week:

Source: http://www.phpdeveloper.org/news/16269

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: ZendCon 2011 Call for Papers Opens!

Community News: ZendCon 2011 Call for Papers Opens!

As was mentioned by Kevin Schroeder, the Call for Papers for this year’s Zend/PHP Conference has officially been announced!

We are happy to announce that planning is underway for the 2011 Zend/PHP Conference which will be held in Santa Clara, October 17-20. ZendCon 2011 will be the best conference yet and we would like to invite you to be a part of it! A conference is only as good as its speakers and we are looking for the best speakers to share their knowledge and expertise with the PHP community. Attendees will include developers, architects, development managers, decision makers, core PHP developers and community members.

The key themes they’re looking for this year are cloud computing, mobile and user experience and enterprise/professional PHP topics. Within those themes there’s several other sub-categories including:

  • Architecture & Best Practices
  • Zend Framework 1&2
  • Rich Internet Apps and Mobile/Tablet – Flash /Flex/HTML 5/CSS3/Ajax
  • Standards Compliance
  • Real World Case Studies, Designs and Data Models

The Call for Papers will close on May 20th, 2011 and speakers will be given a hotel night for each of their sessions that are accepted. Submit your ideas at www.zendcon.com/input to see if you’ll be selected!

UPDATE: for a bit more information on the categories, see this new post on Kevin Schroeder’s blog.

Source: http://www.phpdeveloper.org/news/16268

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

SitePoint PHP Blog: Simple Object Iterators in PHP

SitePoint PHP Blog: Simple Object Iterators in PHP

On the SitePoint PHP blog today there’s a new post from Craig Buckler looking (quickly) at a handy feature of the Standard PHP Library (SPL) that can help make working with objects and arrays simpler – object iterators.

If you’ve been coding in PHP for a while, you may be familiar with the foreach loop. It provides an easy way to analyze every item in an array. As well as arrays, it’s also possible loop through an object. If your object contains a collection of items, you can use a foreach loop to iterate over each of them. [...] Iterators is a subject which strikes fear into the heart of many developers. They sound complex and are often explained with indecipherable abstract references.

To help combat this impression, he gives a bit more practical example – turning a regular array into an ArrayIterator and looping through the collection as an object instead of just a variable. This helps to keep things contained.

Source: http://www.phpdeveloper.org/news/16267

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>