Recent changes for Pandion
Updated: 15 min 11 sec ago
Sun, 07/25/2010 - 14:30
<input name="Submit" value="Build" type="submit" />
</form>
Hudson Build Notification
Update the Version to reflect build status and artifact filename
If version was based on a synch, and if the build was successful, then update the Appcast feed
Sun, 07/25/2010 - 14:26
If the version was published in an appcasting track, remove it from the track and update the appcast feed
Return to Version Archive and show success notification
Custom Building
Building a Version
User enters Add Version form and presses Build (submit) button
Server creates new Version object and stores all properties and status of "Build in Progress"
User sees Version Archive page
Hudson controller checks if a job by this Brand name already exists on the Hudson build server (Hudson HTTP API)
If not, create the job by cloning the BrandMaster job (/createItem with POST data: name=Goliath&mode=copy&from=BrandMaster)
Hudson controller runs a parametrized build of the job, supplying all necessary data to Hudson via HTTP API POST form. (/job/Goliath/buildWithParameters)
Hudson BrandMaster job
Pre build:
Checkout official Pandion IM git repository
Build:
Depending on Source Code origin option:
Nothing
Replace Client subdirectory with extracted custom ZIP archive
Clone custom git repo and replace the official Client subdir with the custom Client subdir
Replace Client settings files
Replace Client and Host branded icon files
(Put the needed Extras in place?)
Set VERSION_MAJOR, VERSION_MINOR, BUILD_NUMBER, and other build_config.bat options
Run build_host.bat
Run build_msi.bat
Post build:
Clean up the file parameters
Archive the artifacts
Publish artifacts to SCP repository (=Packager server)
Call Packager Hudson controller to notify the build is done. Tell it the brand name, version ID, status, and artifact filename
Example Hudson Build using a file parameter (name=test.txt&file=...) and a string parameter (name=foo&value=bar)
<form name="parameters" action="/job/Test/build?delay=0sec" method="post">
<input name="name" value="test.txt" type="hidden" />
<input name="file" type="file" />
<input name="name" value="foo" type="hidden" />
<input name="value" value="bar" type="text" />
<input name="Submit" value="Build" type="submit" />
</form>
Sat, 07/24/2010 - 21:58
API callback from payment processor tells Packager to store the new plan in the User object
Send changed plan notice via email to the use
Disable the Hudson job for the brand (Hudson HTTP API)
Signed In Without Active Subscription
Show brand name in header as disabled/faded
Thu, 07/22/2010 - 03:47
Upon successful payment go to user area Dashboard showing the new brand
Upon failed payment go back to Sign Up page
Sign In
Visit any public page (eg. Home)
If user has an active session, top right menu shows "Hello $username | Dashboard", else show "Sign In" link.
Dashboard link goes to Dashboard in the user area
Clicking Sign In link brings user to the Sign In page which shows a form: Email Address, Password, (Sign In submit button)
On failed authentication, show the Sign In page again, with failure notification above form
On successful authentication show the Dashboard page in the user area
Signing Out
User clicks the Sign Out link/button in the top right menu
Thu, 07/22/2010 - 03:14
Show Account page with success message
Reset Password
Press “Reset my password” “Forgot password?” link at Sign In page
Show Password Reset page
Enter email address, press Submit
Thu, 07/22/2010 - 03:11
Return user to the "Goodbye" page
API callback from payment processor tells Packager to store the new plan in the User object
the user use
Signed In Without Active Subscription
Show brand name in header as disabled/faded
Show all sections as disabled/faded
Display notification at top of page with link to the Plans & Pricing page in the Subscription section where user can renew their subscription
Brand Management
Changing Brand Name
Thu, 07/22/2010 - 02:54
Upon successful payment go to user area Dashboard showing the new brand
Upon failed payment go back to Sign Up page
Signing Out
User clicks the Sign Out link/button in the top right menu
Session/cookie is cleared
Show the public Home page
Editing User Account Details
Click on Account link in top right menu
Thu, 07/22/2010 - 02:52
Packager updates the appcast feed with the new version and track info
Show the Publishing Updates page with success notification
Removing a Version
In the Appcasting section go to the Version Archive page
Browse the list to find the version
Press the Delete link/button
Mark the Version as inactive (but do not actually delete from the server, just in case)
If the version was published in an appcasting track, remove it from the track and update the appcast feed
Return to Version Archive and show success notification
Thu, 07/22/2010 - 02:48
Pandion Packager User FlowsAccount Management
Sign Up
Visit public site and go to Sign Up page
Upon successful payment go to user area Dashboard showing the new brand
Upon failed payment go back to Sign Up page
Editing User Account Details
Click on Account link in top right menu
Show Account page
Edit First name, Last name, Email address, Old/New Password
Press Save
Update data in User object
Show Account page with success message
Reset Password
Press “Reset my password” link at Sign In page
Show Password Reset page
Enter email address, press Submit
If address does not exist for any User, go to step 2 and show error message.
Generate random token for user. Store token and expiration timestamp of (now+30 minutes) in User object
Email URL containing token to email address
Show "Password reset email has been sent" page
When user visits token URL show “Enter new password” page.
If token expired or invalid, go to step 2 and show error message.
User enters new password, user presses Submit.
If token expired or invalid, go to step 2 and show error message.
Save the password in the User object and invalidate the token.
Take user to the Dashboard
Change Subscription Plan
In the user area go to Subscription section
Press "Change Plan" button for the new plan
Follow instructions on Paypal/Spreedly/etc.
Return user to the Subscription section, reflecting the new plan
API callback from payment processor tells Packager to store the new plan in the User object
Send changed plan notice via email to the user
Unsubscribing
In the user area go to the Subscription section
Press the "Cancel Subscription" button
Follow instructions on Paypal/Spreedly/etc.
Return user to the "Goodbye" page
API callback from payment processor tells Packager to store the new plan in the User object
Send changed plan notice via email to the user
Brand Management
Changing Brand Name
In the Subscription section go to Brand Information page
Edit the Brand Name field and press Save
If new brand name is valid, store in the Brand object and return to Brand Information page with success notification
Else, return to Brand Information page with error notification
Changing Brand Logo
In the Subscription section go to Brand Information page
Choose a new image and press Upload
Show the Brand Information page with the new icon
Version Management
Creating a New Version
In the Appcasting section go to the Add Version page
Packager updates the appcast feed with the new version and track info
Show the Publishing Updates page with success notification
Editing User Account Details
Click on Account link in top right menu
Show Account page
Edit First name, Last name, Email address, Old/New Password
Press Save
Update data in User object
Show Account page with success message
Reset Password
Press “Reset my password” link at Sign In page
Show Password Reset page
Enter email address, press Submit
If address does not exist for any User, go to step 2 and show error message.
Generate random token for user. Store token and expiration timestamp of (now+30 minutes) in User object
Email URL containing token to email address
Show "Password reset email has been sent" page
When user visits token URL show “Enter new password” page.
If token expired or invalid, go to step 2 and show error message.
User enters new password, user presses Submit.
If token expired or invalid, go to step 2 and show error message.
Save the password in the User object and invalidate the token.
Take user to the Dashboard
Thu, 07/22/2010 - 02:33
Pandion Packager User Flows
Sign Up
- Visit public site and go to Sign Up page
- Select subscription plan: could be pre-selected by clicking on “Sign Up” button from the Plans & Pricing page
- Enter Brand name: unique name to use for the IM client; typically name of organisation
- Enter First and Last name, Email Address, Password
- Validate and store brand/account data
- Redirect to external payment page (Paypal, Spreely, etc)
- Upon successful payment go to user area Dashboard showing the new brand
- Upon failed payment go back to Sign Up page
Creating a New Version
- In the Appcasting section go to the Add Version page
- Choose source code, either:
- Pick from list of official Pandion IM releases
- Upload/choose a custom ZIP archive containing the “Client” directory
- Validate the ZIP by checking if the directory structure is correct, otherwise reject the archive. Check for existence of “/src/main.html” to validate.
- Configure application settings. All settings are stored in JSON or XML file as used by Pandion IM. Editor resembles Firefox’s “about:settings” UI: all items in a single list with text search capability. The settings file can be imported/exported manually.
- View which extras are included with the installer by default. Can be shown in a table with columns: Name, Type. Each row has a Delete button to remove the extra. Using a search field additional extras (from the Extras section) can be added.
- Choose installer behaviour: install for all users or current user, default installation path.
- Specify the version number using three numeric input fields: major version, minor version, build number.
- Prevent conflict with existing version.
- Warn if number is lower than existing version.
- Press the Build button to submit the form.
- Validate input:
- Avoid version conflict.
- Store the form options as defaults for this Brand
- Create new Version with the form options, set status to “Building in progress” (appears on dashboard and version archive)
- Add Version to the build queue
- Redirect to the Version Archive page
Releasing a Version
- In the Appcasting section go to the Publishing Updates page
- Enable the preferred track by clicking the checkbox in the Published column
- In the Branded Version colum choose an available version. (To create a version go to the Add Version page.)
- Optionally select a Pandion IM update track to synchronise with. This is only for versions based on official Pandion IM source code (i.e. not custom ZIP archives).
- Press the Submit button
- Packager updates the appcast feed with the new version and track info
- Show the Publishing Updates page with success notification
Editing User Account Details
- Click on Account link in top right menu
- Show Account page
- Edit First name, Last name, Email address, Old/New Password
- Press Save
- Update data in User object
- Show Account page with success message
Reset Password
- Press “Reset my password” link at Sign In page
- Show Password Reset page
- Enter email address, press Submit
- If address does not exist for any User, go to step 2 and show error message.
- Generate random token for user. Store token and expiration timestamp of (now+30 minutes) in User object
- Email URL containing token to email address
- Show "Password reset email has been sent" page
- When user visits token URL show “Enter new password” page.
- If token expired or invalid, go to step 2 and show error message.
- User enters new password, user presses Submit.
- If token expired or invalid, go to step 2 and show error message.
- Save the password in the User object and invalidate the token.
- Take user to the Dashboard
Fri, 07/16/2010 - 20:02
To change the name and meta information of the executable, use the provided /Host/build_host.bat batch script. The branding can be customised in the /build_config.bat batch script.
Build Configurations
generate Host-debug.exe Host_debug.exe to clearly distinguish it. Both build scripts will also generate Host%5B-debug%5D.pdb Host%5B_debug%5D.pdb files, more information about those files can be found atMSDN.
Debugging
If you have built the debug version you can pressF5to run your build attached to the VisualC++debugger. You can press F9 anywhere in the source code to toggle debug breakpoints and use F10and F11for respectively stepping in or stepping over the source code once a breakpoint was hit.
Running
at /Client/Host%5B-debug%5D.exe. /Client/Host%5B_debug%5D.exe. Upon launch the Host will create a hidden window that embeds the Internet Explorer WebBrowser control and loads src/main.htmlrelative to its own location automatically.
Client
Pandion.exe (or Host.exe) in the /Client directory. Get a copy of Pandion.exe by compiling the Host as described above, or take Pandion.exe from the distributable on the Pandion website. If you have already installed Pandion you will find it in %ProgramFiles(x86)%PandionPandion.exe.
Editing
Use any text editor (Notepad++, Aptana, EditPlus, ...) to edit the Client source code. The application flow starts with main.html which loads all JavaScript files in /Client/src/main/.*js and has an onload event handler set for init() which is found in /Client/src/main/init.js
Fri, 07/16/2010 - 19:55
Host
The Host is a rich desktop application framework that loads HTML/CSS/JavaScript and exposes operating system functionality to the JavaScript layer. The Host is written in C++ and can be compiled using Microsoft Visual C++ 2010 Express or Professional editions. Microsoft Visual C++ 2010 Express can be downloaded at no cost fromhttp://www.microsoft.com/express/. Installing different Visual Studio/C++ versions (or editions) next to each other poses no problem.
BuildingManual Building: Generic
Open /Host/Host.sln in Visual C++ and press Ctrl+Shift+Bto build the application. UseCtrl+F5 to run your build like any other application. Build dependencies are the Microsoft platform SDK and the libraries bundled with VisualC++, both should be readily available ifVisualC++was installed correctly. The project also has zlib as a build dependency and a precompiled version is bundled with the pandion code on github.
Automated Building: Branded
To change the name and meta information of the executable, use the provided /Host/build_host.bat batch script. The branding can be customised in the /build_config.bat batch script.
Build Configurations
generate Host.pdb Host%5B-debug%5D.pdb files, more information about those files can be found atMSDN.
Debugging
If you have built the debug version you can pressF5to run your build attached to the VisualC++debugger. You can press F9 anywhere in the source code to toggle debug breakpoints and use F10and F11for respectively stepping in or stepping over the source code once a breakpoint was hit.
Running
at /Client/Host.exe. /Client/Host%5B-debug%5D.exe. Upon launch the Host will create a hidden window that embeds the Internet Explorer WebBrowser control and loads src/main.htmlrelative to its own location automatically.
Client
The Client is the user interface and application logic that drives Pandion. To launch the Client you need to place Pandion.exe in the /Client directory. Get a copy of Pandion.exe by compiling the Host as described above, or take Pandion.exe from the distributable on the Pandion website. If you have already installed Pandion you will find it in %ProgramFiles(x86)%PandionPandion.exe.
While you could simply spray your source code with alert() calls to hunt bugs, it's generally easier to use a debugger. The Microsoft Script Debugger is free of charge but you can also use Visual Studio's Script Debugger.
Once you have installed either of these script debuggers, open InternetExplorer and uncheck this inversely named option:Tools->Internet Options…->Advanced->Disable Script Debugging (Other)
the debugger; "debugger;" keyword.
File Hierarchy
The source code is separated along the Model-View-Controller (MVC) pattern. The data (model) is defined in JavaScript files, the skin (view) is specified in CSS, and the UI widgets (controller) are declared in HTML. This language separation enforces loose coupling and best coding practices. There should not be any use of inline CSS or JavaScript in the HTML and no HTML should be declared in the JavaScript. Note:Some legacy code does not follow this guideline yet and needs to be refactored.
Creating the Package
Before attempting to create the package, the Host source code must be compiled in its release version. See the above Host section for instructions.
1. PandionPandion requires WiX 3.5 to be installed successfully.
2. Add
Add the WiX "bin" directory to your PATH system environment variable. Open Control "Control Panel >System and Security >System >Advanced system settings >Advanced >Environment Variablesand Variables" and append the full path to the bin directory to the PATHvariable.
3. Open
Open a console: Start menu >Run >cmd.exe
4. Enter:cd
Enter:cd /path/to/pandion/code/Installer/WiX
5. Run:build_msi.bat
Run:build_msi.bat
The result is an MSI package called Pandion_2.6.0.msi or similar. The build script is designed to integrate with Hudson continuous integration server.
Fri, 07/16/2010 - 19:46
This article explains the basic structure of Pandion's source code. You can access the source code by following the steps in this article:Getting the Source Code
The repository contains three sub-projects. The Pandion application consists of the Client and the Host. There is also an Installer sub-project to build a distributable setup package. package (*.msi). The Appcaster utility is included to generate an auto-update feed.
Host
C++ 2008 2010 Express (or higher). or Professional editions. Microsoft Visual C++ 2008 2010 Express can be downloaded at no cost fromhttp://www.microsoft.com/express/. Installing different Visual Studio/C++ versions (or editions) next to each other poses no problem.
Building
Open /Host/Host.sln in Visual C++ and press Ctrl+Shift+Bto build the application. UseCtrl+F5 to run your build like any other application. Build dependencies are the Microsoft platform SDK and the libraries bundled with VisualC++, both should be readily available ifVisualC++was installed correctly. The project also has zlib as a build dependency and a precompiled version is bundled with the pandion code on github.
You'll also need the"Headers and Libraries for Windows Internet Explorer 8" SDK packageavailable at:http://www.microsoft.com/downloads/details.aspx?FamilyID=bd98f760-1279-46f2-a456-de6df365584bDon't forget to add theC:Program Files (x86)Microsoft SDKsInternet Explorerv8include andC:Program Files (x86)Microsoft SDKsInternet Explorerv8lib directories in theTools > Options > Projects and Solutions > VC++ Directorieswindow in Visual Studio. Make sure you add them to "Include files" and "Library files" respectively. If you don't have the package the build will fail asking for openservice.h. The SDK directories should be on top as seen in this picture:http://i36.tinypic.com/103g2vp.png.
Build Configurations
build configurations:debug configurations: Debug and release. Release. Use release for deploying Release to deploy your application for real-world usage and use debug Debug for testing. testing while developing. The release Release build will generate pandion.exe Host.exe, and the debug Debug build will generate pandiond.exe (to Host-debug.exe to clearly signify it's a debug build),both distinguish it. Both build scripts will also generate .pdb Host.pdb files, more information about those files can be found atMSDN.
Debugging
If you have built the debug version you can pressF5to run your build attached to the VisualC++debugger. You can press F9 anywhere in the source code to toggle debug breakpoints and use F10and F11for respectively stepping in or stepping over the source code once a breakpoint was hit.
Running
output file pandion(d).exe executable will be placed at /Client/Pandion(d).exe. /Client/Host.exe. Upon launch the Host will create a hidden window that embeds the Internet Explorer WebBrowser control and loads src/main.htmlrelative to its own location automatically.
Client
The Client is the user interface and application logic that drives Pandion. To launch the Client you need to place Pandion.exe in the /Client directory. Get a copy of Pandion.exe by compiling the Host as described above, or take Pandion.exe from the distributable on the Pandion website. If you have already installed Pandion you will find it in %ProgramFiles(x86)%PandionPandion.exe.
Fri, 06/11/2010 - 19:16
Hi thanks for the article on this pbworks,in my mind i think your article wonderful
thanks from me
http://getmakemoneyonline.com
http://laptop-komputer.com
http://mortgagecalculatorlender.com
regards
Fri, 04/09/2010 - 12:10
http://www.ircask.com
http://www.ircask.org
http://www.sohbet-tr.org