Skip to content

Feed aggregator

Hacking Silverlight

SilverlightShow: Silverlight Community - Sun, 12/27/2009 - 23:00
Coming soon... Product Description

"We did what would normally take six months in eight days-with a team learning from scratch." -from Chapter 1 of Hacking Silverlight

Writing good code is hard enough using established, well-documented technologies; with something new like Silverlight, you need to think like a hacker. Hacking Silverlight is a unique tutorial that shows the reader how to build great Silverlight web applications fearlessly. Each chapter starts and ends with carefully annotated code examples that range from Silverlight basics to undocumented techniques you won't find anywhere else.

Author David James Kelley is part of an elite group hand-picked by Microsoft to test early Silverlight builds and develop sample applications. This book guides the reader through a running case study of an actual, large-scale Silverlight project.

About the Author

David James Kelley is a Senior Software Architect at IdentityMine. For over 10 years David has focused on distributed application design and emerging Microsoft technologies on the web. He helped design and build large systems for Microsoft, Onyx Software, Saltmine, Giordanous Group, and IdentityMine and he has specialized in applying leading-edge technology to real-world business problems. David built many of the core Popfly blocks in Silverlight and was part of the team that created the Emmy Award site for Entertainment Tonight--one of the first large-scale commercial Silverlight applications.  

Buy from:
Amazon 


Categories: Communities

Essential Silverlight 2.0 (Microsoft .NET Development Series)

SilverlightShow: Silverlight Community - Mon, 10/12/2009 - 06:00

Coming soon...

Product Description

After building an application, people often ask why theirs doesn’t work as well as another similar Silverlight application. The product team answers those questions on a case-by-case basis. However, the root cause of much of this confusion is a lack of knowledge of the inner workings of the system. The functional API description provided by the SDK, Web materials, and other books allow developers to build an application that looks and behaves as they expect but when it comes to problems such as application performance and deployment, a much deeper knowledge of the product is required.

 

Essential Silverlight 2.0 provides an under-the-covers look at the design decisions and inner workings of the Silverlight platform from the architect himself, Ashraf Michail. Microsoft Silverlight is a rapidly growing Web technology that allows developers to deliver graphics, video, and rich interactive applications on multiple operating systems and browsers. The availability of material that gives developers behind-the-scenes insight is scarce. Providing insights into the motivating design principles and inner workings of the run-time, this book is for developers who want to get the most out of Silverlight. After reading this book, the reader will have an understanding of why some Silverlight applications work better than others and, with that understanding, will be able to get more out of Silverlight in his or her own applications.

About the Author

Ashraf Michail is the only Microsoft architect who has continued to work on Silverlight since the original project began. In 2001, he joined Microsoft's newly forming WPF team, where he built the GPU accelerated graphics engine used to render WPF content and included in the Vista Desktop Window Manager. In 2004, he became a WPF architect focused on improving the end-to-end WPF experience. In 2005, he became an architect on the new Silverlight team, where he is currently working on Silverlight's next release. With nine years of experience delivering web platforms and rendering engines, Michail's deep insights have guided Silverlight's design.

Buy from:
Amazon

Categories: Communities

It’s Friday. Play some drums…. HTML5 style

Ajaxian - 5 hours 37 min ago

Brian Arnold created a fun sample drum machine simulator using HTML5 <audio>.

PLAIN TEXT JAVASCRIPT:
  1.  
  2. function playBeat() {
  3.         if (isPlaying) {
  4.                 var nextBeat = 60000 / curTempo / 4;
  5.                 // Turn off all lights on the tracker's row
  6.                 $("#tracker li.pip").removeClass("active");
  7.                 // Stop all audio
  8.                 stopAllAudio();
  9.                 // Light up the tracker on the current pip
  10.                 $("#tracker li.pip.col_" + curBeat).addClass("active");
  11.                 // Find each active beat, play it
  12.                 $(".soundrow[id^=control] li.pip.active.col_" + curBeat).each(function(i){
  13.                         document.getElementById($(this).data('sound_id')).play();
  14.                 });
  15.                 // Move the pip forward
  16.                 curBeat = (curBeat + 1) % 16;
  17.                 // Schedule the next one
  18.                 setTimeout(playBeat, nextBeat);
  19.         }
  20. }
  21.  

That's not all Brian is working on:

I'm also working on something like the ToneMatrix or Tenori-on (Flash and actual devices, respectively) in pure HTML/JS. It works too, but the sounds aren't exactly designed to be great together (it's currently working on a C scale) and so if you're careful, you can get some decent sound but otherwise, it'll hurt your ears.

Categories: Communities

Auditing and entity versioning based on triggers and hibernate

agimatec - 5 hours 38 min ago

If you are looking for a framework for auditing the versions and changes of your hibernate objects, you might probably be satisfied with Envers (http://www.jboss.org/envers/), a solution based on hibernate.

In this blog entry I want to give you an impression of an alternative solution by agimatec, that is slightly different. It is the solution we are using in our products for more than two years and with which we are satisfied. It would be interesting to hear your options on this.

The concept

Database:

We generate history tables for each table for which we need auditing. We generate database triggers (oracle or postgres) to automatically insert data in the history tables when entities are stored/deleted.

We do not store duplicate data, which means that our history tables contain only OLD data. All current data is ONLY stored in the application’s tables (usually mapped by hibernate/Ejb3).

Configuration:

We have a XML configuration, that contains the table names for which we want to enable our history solution. This configuration lets you specify:

  • name of history table (or a default name will be used)
  • which columns to exclude from history (default is that all columns are historised)
  • optionally you can turn off history for insert and/or update, change trigger names etc.

The XML configuration controls the tables and triggers generated by freemarker templates.

Features:

It is not only important to version the changes, but also to store, the timestamp of a change and some context information about the change (e.g. who is the actor, which application, from which sessionID etc.). Any context information can be associated with a version record by storing a contextID in the history table’s rows.

This is also a way to separate changes from user-specific data, which might be a judical requirement. An extended Hibernate event handler stores the contextID into the database session by calling a stored procedure, so that the history triggers and access the contextID to store it together with the history data.

Each history table has additional columns:

  • HIST_TIME (timestamp of change)
  • HIST_CONTEXTID (ID of context providing additional information)
  • HIST_TYPE (to distinguish INSERT, UPDATE and DELETION)

A simple java API exists to query historical data. It returns the same classes as you use for your hibernate entities, but it materializes the objects itself. Hibernate does not know anything about the history tables or mappings.

The benefits

There are some differences between the solution provided by Envers and agimatec:

  • Envers needs a global _revision table, agimatec’s history rows are identified by the primary key and a version number (@Version) incremented from 1 for each entity/no global _revision
  • You can change data with any SQL tool.Historisation does not rely on hibernate as the only API to change the database.
  • Whenever you increment a row’s version, the history triggers will automatically write historical data. By this way, you can use migration scripts that can control whether history data will be stored.
  • Envers stores current data in history tables, which makes it a bit easier to query the data, but with means redundancy (and potential data inconsistencies).
  • Both framework are integrated with Hibernate by extending the Hibernate Events (to provide context information).

Examples

History configuration

<historyConfig>
<tableConfig>
<tableName>booking</tableName>
</tableConfig>
<tableConfig>
<tableName>customer</tableName>
<historyTable>h_cust</historyTable>
<insertTrigger>TR_I_cust</insertTrigger>
<updateTrigger>TR_U_cust</updateTrigger>
</tableConfig>

Generated tables

CREATE TABLE H_JOURNAL (
ID INTEGER NOT NULL,
HIST_TABLE VARCHAR(50) NOT NULL,
HIST_TIME TIMESTAMP NOT NULL,
HIST_CONTEXTID VARCHAR(40),
CONSTRAINT H_JOURNAL_PK PRIMARY KEY (ID, HIST_TABLE)
);

CREATE TABLE H_booking (
VERSION INTEGER NOT NULL,
booking_id INTEGER NOT NULL,
price NUMBER,
HIST_TIME TIMESTAMP NOT NULL,
HIST_CONTEXTID VARCHAR(40),
HIST_TYPE CHAR(1) NOT NULL,
CONSTRAINT H_booking_PK PRIMARY KEY (VERSION, booking_id)
);
CREATE TABLE H_cust (
VERSION INTEGER NOT NULL,
cust_id INTEGER NOT NULL,
first_name VARCHAR2(40),
last_name VARCHAR2(40),
HIST_TIME TIMESTAMP NOT NULL,
HIST_CONTEXTID VARCHAR(40),
HIST_TYPE CHAR(1) NOT NULL,
CONSTRAINT H_cust_PK PRIMARY KEY (VERSION, card_id)
);

Generated triggers

CREATE OR REPLACE TRIGGER TR_I_cust
AFTER INSERT ON customer
REFERENCING NEW AS NEW
FOR EACH ROW
BEGIN
setTATime();
INSERT INTO H_JOURNAL (ID, HIST_TIME, HIST_CONTEXTID, HIST_TABLE)
select :NEW.card_id, h.ts, h_session.getContextId, 'customer' from h_tatime h;
END;
/

CREATE OR REPLACE TRIGGER TR_U_cust
AFTER DELETE OR UPDATE
ON customer
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
IF(DELETING) THEN
setTATime();
INSERT INTO H_cust (
cust_id,
version,
first_name,
last_name,
HIST_TIME, HIST_CONTEXTID, HIST_TYPE)
select
:OLD.cust_id,
:OLD.version,
:OLD.first_name,
:OLD.last_name,
h.ts, h_session.getContextId, 'D' from h_tatime h;
ELSIF (UPDATING AND :OLD.VERSION != :NEW.VERSION) THEN
setTATime();
INSERT INTO H_cust (
cust_id,
version,
first_name,
last_name,
HIST_TIME, HIST_CONTEXTID, HIST_TYPE)
select
:OLD.cust_id,
:OLD.version,
:OLD.first_name,
:OLD.last_name,
h.ts, h_session.getContextId, 'U' from h_tatime h;
END IF;
END;
/

Java API

The implementation of class HibernateHistoryReader was rather complex, because of the need to resolve the relationships through the current tables and the history tables. All changes done inside a single transaction are joined together by using a timestamp in HIST_TIME that is unique inside the running database transaction.

Here is interface HistoryReader:

interface HistoryReader {

void open(EntityManager entityManager);
void close();

List<EntityRevision> getRevisions(Class entityClass, Object primaryKey, Timeframe timeframe);
EntityRevision getRevision(Class entityClass, Object primaryKey, int version);

Map<Object, List<EntityRevision>> getChildrenRevisions(Class parentEntityClass,EntityRevision parentRevision,String relationship);

<E> HistoryEntity<E> loadEntity(Class<E> entityClass, Object primaryKey,Timestamp time);
<E> List<HistoryEntity<E>> loadChildren(Class parentEntityClass, String relationship,
Object parentPrimaryKey, Timestamp time);

}

Where class HistoryEntity contains the entity instance for a given point of time and some additional information, such as the contextID and the foreignKey values to load some to-one-references.

If you are interested in more details contact us.

Categories: Blogs

What is the Appeal of Ajax and GWT?

Ajax does have its detractors. Their argument goes as follows: Why reinvent everything that has already been done on the desktop on an inferior platform? I do agree that the attraction of Ajax is subjective (i.e., not based on technological arguments). This is obvious whenever I’m excited about something web-based, show it to non-developer friends and their only reaction is boredom. Then I...
Categories: Communities

Machsend: P2P file sharing via Browser Plus

Ajaxian - 7 hours 56 min ago

Alex MacCaw has released Machsend, a Yahoo! Browser Plus plugin that enables P2P file transfers from inside the browser.

It showcases what can be done with a BP plugin, leaving you wish cross browser functionality.

I guess it is kinda fun to hack the browser :)

Categories: Communities

JavaFX - ComboBox

Rakesh Menon - 8 hours 29 min ago

JavaFX SDK provides Control and Skin interface which can be used to create custom controls. Lets create a ComboBox with these two classes...

For Applet mode, click on above image

For standalone mode

The ComboBox is created using a combination of Label and ListView. The ListView instance is dynamically inserted into content of Scene so that it appears on top of all existing content. Its deleted from Scene on making list invisible.

The entire logic of control is implemented in Skin. Behavior class can be implemented to handle keyboard events. The look is copied from Nimbus. It can be easily customized.

Also available - Color Picker

Try it out and let me know feedback

Source:

var dzone_url = "http://blogs.sun.com/rakeshmenonp/entry/javafx_combobox"; var dzone_style = '2';

Categories: Blogs

Win9x/ME no more..

TrollTech Qt Labs Blogs - 11 hours 3 min ago

So, the time has come to say goodbye to the good’ol non-unicode Windows systems.

Qt has for a very long time had the QT_WA/QT_WA_INLINE(uni, ansi) macros to provide support for both Windows ANSI systems and their Unicode equivalents, and thus supported running Qt applications on old Windows systems without the MSLU (Microsoft Layer for Unicode) installed. It was in our plans to ditch the ANSI code for Qt 4.6, and take the chance to clean up our code, making it more maintainable for the future. With the upcoming Windows 7 I’m sure we’ll still have our share of special-casing the various Windows versions, so it’s time to ditch the old platforms which Microsoft themselves haven’t supported since 2003 (mainstream support ended in 2003, while extended support ended on 11th of July 2006, 3 years ago).

Right after the launch of our contribution model, Milan Burda contacted me and asked if there were any projects open which he could help out with. Within a few days he had whipped up a series of patches, totaling a 15K line diff, which successfully removed the old ANSI code from Qt. And now, after some reviewing, splitting, reorganizing and squashing, and auto-testing of the rebased version of his commits, these patches have finally made it into Qt’s mainline.

Unfortunately, in the reorganization process I failed to maintain the authorship on some of the splits; but rest assure that the whole series, with the exception of commit cfadf08a, is all his! Great work Milan, thanks!

PS:
Should we have, despite the review and auto-test process, and introduced any regressions, please add “[ANSI regression]” to your bug report subject, and I’ll keep a keen eye on those when they come in. As Qt mainline is not a supported release, please use the web form to send these requests.

Categories: Companies

A Bulgarian Team Goes On the Finals of Imagine Cup

SilverlightShow: Silverlight Community - Fri, 07/03/2009 - 03:38

MindPointImagine Cup is the world’s premier student technology competition. One of the projects that goes to the finals of the competition is made by the Bulgarian team MindPoint and is called Envision. It represents a system for interactive elementary education. You can see a short video of the project here.

If you like the idea of MindPoint don't hesitate and give them a hand by voting at http://peopleschoice.imaginecup.com/default.aspx.


Categories: Communities

A Member of SilverlightShow Wins Microsoft MVP Award

SilverlightShow: Silverlight Community - Fri, 07/03/2009 - 03:03
Emil StoychevThe team of SilverlightShow is proud to announce that our colleague Emil Stoychev is now one of those lucky guys who could name themselves "a Microsoft Silverlight MVP"! Find out more about Emil's work and interests in his MVP profile. Congratulations, Emil! You really deserved this award with your hard work! Microsoft Most Valuable Professionals (MVPs) are exceptional technical community leaders from around the world who are awarded for voluntarily sharing their high quality, real world expertise in offline and online technical communities.


Categories: Communities

Creating NikeClone With Silverlight Part 3 and 4

SilverlightShow: Silverlight Community - Fri, 07/03/2009 - 02:46
In Part 3 of his series Faisal adds some code in the btnLogin’s Click event and created a StyledSearchTextBox and template for the search buttons. In Part 4 he shows you how to create CardsUI.

In the second part I showed you how to create LoginWindow. In this part of the NikeClone series I will add some code in the btnLogin click event handler In SoccerItemList which we created in the first part of this series and how to create a StylesSearchText UI and Templated search buttons which will be used for searching.


Categories: Communities

Silverlight Application – Animal Testing Breaks Hearts

SilverlightShow: Silverlight Community - Fri, 07/03/2009 - 02:25
Pete Brown turns your attention to one great Silverlight 2 application for the Animal Testing Breaks Hearts campaign that PETA and AIS just completed.Pic

For this application, PETA supplied all the comps in Adobe Illustrator format and AIS converted the assets into Silverlight. Tad Van Fleet took the heart images and others and imported them into Blend 3 using the new Illustrator import function, and created the appropriate Xaml. A team consisting of Jim Jackson, Tad Van Fleet and Tom Snider with contractual work and a little oversight from me, put together the complete application, including the database, WCF services, server-side image generation for embedding, and of course the Silverlight client - all in just two calendar weeks.


Categories: Communities

Summer Cabinet 2009 – Social Mapping with Silverlight

SilverlightShow: Silverlight Community - Fri, 07/03/2009 - 02:17

Another great Silverlight mapping application has just gone live: Summer Cabinet Map 2009. The Summer Cabinet Map has the following features:

  1. Zooms to show Scotland as a start point
  2. Smooth zooming and panning with more detail seamlessly brought into view
  3. Select a location zooms to that location and the pin changes to show more detail, including date and location name
  4. When selected each location exposes a panel which offers various information and media


Categories: Communities

Styling a TreeView in Silverlight 3 and Blend 3

SilverlightShow: Silverlight Community - Fri, 07/03/2009 - 02:01

In this article Timmy Kokke explains in detail how to style a TreeView control in Silverlight 3 using the Silverlight Toolkit and Expression Blend 3. He covers topics like Sample Data and Hierarchical Data Templates.

Today I would like to show you how to style a TreeView control in Silverlight using Expression Blend 3. The TreeView is a control to visualize hierarchical data structures. The TreeView control isn’t part of the standard Silverlight 2 or 3 download, but can be downloaded from http://www.codeplex.com/silverlight.


Categories: Communities

Silverlight Cream for July 02, 2009 -- #627

SilverlightCream - Fri, 07/03/2009 - 01:56
In this Issue: Erik Mork(2), Michael Washington, Faisal(2), Andrej Tozon(2), and Jose Fajardo.

I feel like I went through a time-warp or something because there is a flurry of SL out there right now. And a couple of folks are just flooding me! Hopefully I can catch up this weekend.

From SilverlightCream.com:
Downloading Prism
Prism apparently is not straightforward to get up on your machine (oops, kinda lets you know I'm not running it eh?) oh well..Erik Mork has a great tutorial links and all, no more excuses!
10 Things to Know About Silverlight Prism
When I first saw Erik Mork's 10 things post I thought ok, a list ... but nope .. each of thse is important and links out to a podcast, video, or post ... great list of resources!
Silverlight FileUploader 2.0
Michael Washington has provided a cool File uploader that gives each use the ability to create their own unique structure on your DNN portal.
Creating NikeClone With Silverlight Part-3
Faisal continues his cool series on duplicating the original Nike site. This time he is working on the basics of a search control.
Creating NikeClone With Silverlight Part-4
Faisal goes through some great Expression Blend information in this series... check it out to make sure it's not new to you!
Countdown to Silverlight 3 #4: Element binding
If you're not aware of this stuff, Andrej Tozon explains in words and example binding between UI elements in SL3B in his countdown series.
Countdown to Silverlight 3 #5: ChildWindow (Modal, Non-modal, Templated)
Andrej Tozon is ahead of me on posts, and I'll catch up eventually, but in this post he is covering the ChildWindow control... very cool and needed!
Blend 3 + Silverlight 3 = Luv (video demo)
Jose Fajardo has a great set of videos out walking you through what he thinks is the best to know about Expression Blend ... and from Jose, that's saying something... these are to watch!

Stay in the 'Light!
Twitter SilverlightNews | SL Web Articles | My SL2+ Tutorials | My SL2 Articles | My SL2 ToolTips | My Tutorials | My Articles | My Tooltips | SL2 Web Articles | SilverlightCream | Join me @ SilverlightCream |


Technorati Tags:        

Categories: Communities

Countdown to Silverlight 3 Part 7: Navigation

SilverlightShow: Silverlight Community - Fri, 07/03/2009 - 01:52

In this 7th part of the Countdown to Silverlight 3 series Andrej Tozon presents another powerful Silverlight 3 feature - Navigation. Here is a list with Andrej's previous posts from the series:

The concept is very simple: provide a space on your main page, which you’ll later fill with custom content – pages. You’ll be able to navigate through these pages (by using browser’s Forward/Back buttons, directly access them and even provide custom parameters.


Categories: Communities

Build High Performance Web Apps

Coach Wei - Direct from Web 2.0 - Fri, 07/03/2009 - 01:37

Below are the slides for a recent techstars session:

It covers some basic stuff for web performance, scalability and availability, such as:

  1. Common architecture pattern for horizontal scalability;
  2. How to do load balancing;
  3. Cost effective load balancing options;
  4. Cloud computing does not solve scalability issue;
  5. how to optimize web performance;

A list of free tools available are also mentioned, such as YSlow, RockStar Web Profiler and RockStar Optimizer.

Categories: Blogs

Summer Cabinet 2009 – Social Mapping with Silverlight

SilverlightShow: Silverlight Community - Fri, 07/03/2009 - 01:03

Bob Thomson announces that another mapping application named Summer Cabinet Map 2009 has just gone live.Pic

While the DWQR Map we published earlier in the week was more about the presentation and dissemination of information – pretty much a one way flow - the Summer Cabinet Map is much more about trying to engage with a community and provide an online destination where the distribution of information can become the start point for a conversation with users.


Categories: Communities

Tibco PageBus: an event framework for JavaScript

InsideRIA - Thu, 07/02/2009 - 22:48
Tibco PageBus is a free event framework for JavaScript. In this entry I discuss the merits of PageBus, how to implement it, and show a quick example demo I built integrating some HTML, PageBus, and a very simple Flash component.
Categories: Communities

Qixing’s Blend and SketchFlow Mini-Tutorials…

Microsoft Silverlight content - Thu, 07/02/2009 - 21:55
Qixing Zheng just posted a series of short video tutorials on Blend 3 and SketchFlow. See them at: http://blogs.msdn.com/canux/archive/tags/Mini-tutorial/default.aspx Stay tuned, more on SketchFlow very soon…...( read more )...(read more)
Categories: Companies