Java-Script Widget Pattern

Saturday, 23 February 2008 17:55 by Frimbob

The Design pattern below for a JavaScript widget, is inspired by the pattern used for YUI-Framework widgets. I have made a copy for future projects. Some of the Features of this pattern are.

  • Constructor by calling object.init().
  • Public and Private Variables.
  • Public and Private Function.
  • Encapsulated in a namespace.

//repeat below line only once to create the Namspace

var NameSpace = function (){//empty add properties later}

//widget model.

NameSpace.Name = function()
    {
        // Private Variable for the module. Not accessible from outside 
        // Private function. Not accessible from outside 
    return { 
                  //public properties 
   return this; 
                //public functions

     init : function(){ // Priviledged method. Can be called from outside
            // Here comes the initialisation code }, //end int function 
      }; //end of return 
  }();  //end of module

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Some Screen Mockups

Thursday, 21 February 2008 14:50 by Frimbob

I have been doing some designing for the office add-in project, I have done a couple of mock-up interfaces with Viso 2007, This add-in will in a nutshell convert a articles in a document to html for easy transmission into the web-site.

Once the user clicks the button to call up a wizard which is a number of steps.


Introduction


gif_1

A simple introduction screen with some instructions


Step 1


gif_2

The code will compile a list of found articles on the current page and will allow the user to select which article to process.


Step 2


gif_3

The interface servers 2 purposes, the first to set the image folder if its not already correct and the second is to select which articles have need of image.


Step 3


gif_5

This interface is only shown for each article that was selected in Step 2, there is a lit of images which can be selected with a preview pane.


Final


gif_6

Click finish to process :-)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , ,
Categories:   Projects
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Preparation makes perfect

Wednesday, 20 February 2008 21:55 by frimbob

Well now that my next semester of university starts on the 25th of Feb, I find that I must spend time in preparation for my classes. Of main concern is the Object Oriented Programming (OOP) for short class.

I have in the past few months  spend time learning learn c#, For this class I need a working understanding of C++, While the syntax is similar and many of the methods are inherent in the .NET framework, study is still required.

In that endeavour I have purchased a book which I will be working from over the next few days:

[ Ivor Horton's Beginning Visual C++ 2005 ]

http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764571974.html

My Time Table

 timetable

I do get one day off a week to get work done, and only one early start, I have had worse timetables.  My only concern is Friday work stuff.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   ,
Categories:   Life and Stuff
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Top 10 UI Design Mistakes

Wednesday, 20 February 2008 15:11 by frimbob

I was reading Jakob Nielsen alert box, yesterday and found this interesting article on the top 10 User Interface design mistakes.

One of the 'bonus mistakes' that some designers do is use reset buttons on web forms. I must reluctantly admit I am one of those designers.  On my last project I created a form reset. Thinking back now the only reason I wanted such a function was to make it easier for testing. It a mistake that I wont make again.

Another item mentioned by Jakob is that scrollbars seem to be the most often changed elements, and I tend to agree with him on that one, there is just no reason to change them but I keep seeing it done.

Its and interesting read, I would recommend it. 

[Article can be found here:]

http://www.useit.com/alertbox/application-mistakes.html

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , , , ,
Categories:   Tech Tips
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Movie - Jumper

Saturday, 16 February 2008 20:44 by Frimbob

jumper Well  having just seen this movie, Saturday night I think I will say a few words.

Was it worth the $12 ticket price, well I say yes. Is it a particularly good move? Well it is average big special effects blockbuster, lots of action and big moments.

How was the acting? It could of been worse, Hayden Christensen acting was likable and heck of a-lot better than his Star-wars roll and Samuel L. Jackson as the big bad guy said very little  but hey the move would be worse if that little did not exist.

The sequel was left far open at the end, but there was little plot and the running time was a small 98 minutes.

That being said it was well paced, tons of action and for 12 dollars on a slow night, it filled the time well.

[Jumper the Book (movie is very different)]

http://en.wikipedia.org/wiki/Jumper_%28novel%29

[Wikipedia entry]

http://en.wikipedia.org/wiki/Jumper_(film)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   Life and Stuff
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Research Results : Number 1

Thursday, 14 February 2008 11:21 by Frimbob

The Good News:

Well I think I have solved the problem of weather I can read  a web page into a word document directly, I found that the .Net Frame work has a WebRequest Class.

Quickly using the code found in the MSDN article and adding word-specific print code, I can now import a web-page directly.

Code:

 [code]

         ' Create a request for the URL.
        Dim request As WebRequest = WebRequest.Create("
http://www.aireview.com.au/index.php?act=view&catid=8&id=7944")
        ' If required by the server, set the credentials.
        'request.Credentials = CredentialCache.DefaultCredentials
        ' Get the response.
        Dim response As WebResponse = request.GetResponse()
        ' Display the status.
        'Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
        ' Get the stream containing content returned by the server.
        Dim dataStream As Stream = response.GetResponseStream()
        ' Open the stream using a StreamReader for easy access.
        Dim reader As New StreamReader(dataStream)
        ' Read the content.
        Dim responseFromServer As String = reader.ReadToEnd()
        ' Display the content.
        Dim r As Word.Range = Me.Application.ActiveDocument.Range
        r.Text = responseFromServer.Length
        'Console.WriteLine(responseFromServer)
        ' Clean up the streams and the response.
        reader.Close()
        response.Close()

 [/code]

The Problem:

Well to sum it up It doesn't work with the www.aireview.com.au web-site.

It appears that the stream that arrives only contains 69 characters, I am guessing that the stream is taken before the PHP script has finished queuing the database.

One problem fixed on Big Problem Found.

More Research is Needed.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   ,
Categories:   Projects
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Project: Office Add-In

Thursday, 14 February 2008 09:37 by Frimbob

Aim:

To build and office Add-In using VSTO 2005SE to build a weekly magazine from   HTML articles  and to transform daily articles from word into html for posting on the web-site.

Time Frame:

6 Months, with university emending I would expect at least to the mid-year before any significant gain are produced.

Project Description:

The project is broken into two main groups, the collection of classes that will transform HTML into the template for the Weekly Magazine. The second group of classes that will turn the daily articles in word into html for posting.

Aims for the First Group

  • Read the Html from a supplied URI and copy on the reverent html for the story.
  • Interfaces to gather the URI and any images for the Article.
  • Apply select styles from the template to the transformed text.
  • Either retrieve the html pages or dynamically accept a URI list and dynamically construct a script to retrieve them.
  • Allow Folder to be browsed for images.
  • Include bold HTML as bold Text as well as other generic formatting tags.
  • Split the Articles into two or more groups.

Aims for the Second Group

  • Create and XML Schema for a template
  • Design output the will allow easy access to the headline,images and the article
  • Wont automate the upload process, no database access and the text-pad used with the CMS is a java-applet.

Research:

  • VB.net and office HTML processing methods and external libraries.
  • Can VB accept a web-pages source into the text reader without first saving the page. If not can a scripting language be used to download the html pages from a dynamically constructed list of URI's.
  • Are there Similar Products available and are there any bits of information that could be useful for this project.
  • Word Markup and Object model.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , ,
Categories:   Projects
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed