Tuesday, March 12, 2013

Install UML Class Diagram plugin in Eclipse

 

UML diagrams compliment inline documentation ( javadoc ) and allow to better explore / understand a design. This is very useful if you trying to show a simple design to a group of students.

In this post, we will install and use the ObjectAid plugin for Eclipse to produce jUnit lib class diagrams. Then, we will be able to generate UML diagrams by simply dragging and dropping classes into the editor. We can further manipulate the diagram by selecting which references, operations or attributes to display.
  • Open Eclipse and go to Help > Install New Software
  • Click on add to add a new repository
  • Enter name ObjectAid UML Explorer
  • Enter Location http://www.objectaid.com/update

Next, select the first two items that are required for the ObjectAid Class Diagram plugin - it is free - and click Next. The Sequence Diagram one requires a paid license.


**If you get an error message saying the component cannot be installed. Something like below:

"Cannot complete the install because one or more required items could not be found. Software being installed: ObjectAid Class Diagram 0.9.86 (com.objectaid.uml.feature.group 0.9.86) Missing requirement: ObjectAid Class Diagram 0.9.86 (com.objectaid.uml.feature.group ..."

You didn't install the GEF, which is a requirement for ObjectAid. You can get it at http://www.eclipse.org/gef/. and install the GEF and then repeat the above steps.
 


Click Finish to confirm your choices and start the instalation process.
  • Click Ok on the security warning
  • Select Restart Now after the installation completes to restart Eclipse.
 

To create a new UML diagram we start the ObjectAid wizard with File > New > Other... and start typing in the textbox Class Diagram to filter the desired wizard. Click Next, and enter a directory and name for the diagram.


Drop java source or compiled class files into the visual UML editor to start populating the diagram. Right click on a generated class to bring up a context menu and adjust visibility, operations attributes, etc as you like.
Below, we see the Assert class from the jUnit library with all operations and fileds hidden.



From the context menu, we can add implementations and associations for a selected class. In the following screen, we add the interface Test implemented by the TestCase class.


This is how part of the jUnit UML class diagram look after adding some more classes.


To auto layout the diagram right click anywhere within the editor and select Layout Diagram. From the same menu, you can export the diagram to an image ( gif png jpeg ) by clicking the Save As Image... menu item






Monday, September 10, 2012

jQuery UI

Three ways of downloading or install jQuery UI :


1  default package:
You can download the jQuery UI 1.8.4 ( zip ~1 MB ) which contains the complete set of all jQuery UI 1.8 components and the Smoothness theme.
Just click http://jqueryui.com/download/jquery-ui-1.8.4.custom.zip
2 customize package :
You can download the customize package in which you can select the following option :
  • UI core
  • Interactions
  • Widgets
  • Effects
  • Theme
  • Version
After selecting these option you have to click the 'download ' button and you'll get a customized zip file containing everything you selected.
After downloading you'll get a zip containing the following files:
  • /css/
  • /development-bundle/
  • /js/
  • index.html
Adding jQuery UI on web page :
<link type="text/css" href="css/themename/jquery-ui-1.8.4.custom.css" 
      rel="Stylesheet" /> 
<script type="text/javascript" src="js/jquery-1.4.2.min.js">
</script>
<script type="text/javascript" src="js/jquery-ui-1.8.4.custom.min.js">
</script>

 
:
By adding google api url :
For example , we can add jQuery UI on web page as :
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js">
</script>

Wednesday, April 27, 2011

Install sample database AdventureWorks for SQL 2008 R2 Express with Advance Services Edition

First thing is to download files for the correct edition SQL server - as many resources indicate it works for Express edition unless you have download the one with Advance Services.
I downloaded from
http://www.microsoft.com/express/Database/InstallOptions.aspx
which is the only Express version that contains Full-Text Search.

Second, find the right sample database file. In my case, I have Windows 7 and SQL Server 2008 R2 Express (installed via Web platform installer3.0), and SQL server 2008 R2 Express  with Advance Services (installed from the download .exe file). I downloaded "AdventureWorks2008R2_SR1.exe" sample database from http://msftdbprodsamples.codeplex.com/releases/view/55926


Notes**I had the SQL server 2008 Express installed on my computer. The first time of installing of SQL 2k8 R2 Express with Advance Services was "successfully completed" but not right because the Full-text services option (required) was missing. I uninstalled all my SQL server 2008 components through the control panel. And then tried to install only "SQL 2k8 R2 Express with Advance Services" edition but the installation aborted.  I was guessing I removed too more components than needed. so I decided to install the SQL Server 2008 Express through the web platform installer to avoid any missing dependency.

The installation of SQL 2k8 R2 Express with Advance Services finally proceed and completed. I was able to find the options of Full-text Search service and started it. I was able to find the FileStream option and enabled it. Everything looks good.

Here came the installation of the most wanted part-sample databases. A self-extracting file and the process went smooth and have no problem at all. below are the screen shots:





Wednesday, March 16, 2011

Windows Authentication using local developer server

I'm developing an ASP.NET application which needs Windows Authentication. I have the web.config set up to deny anonymous users and use Windows mode for authentication, but my local development version still lets me pass right through to the site. In order to test different user set-ups, I need to force authorization so I can change users.
How do I set up my system (config files, VS2005 settings, IIS, etc?) to force the authorization window to popup on the site when I'm running on local asp.net development server? In other words, how do I get the authentication popup when running the site in Debug mode?

You will also need to configure IIS and have your application point to IIS instead of the local web server
To configure Windows authentication
  1. Start Internet Information Services (IIS).
  2. Right-click your application's virtual directory, and then click Properties.
  3. Click the Directory Security tab.
  4. Under Anonymous access and authentication control, click Edit.
  5. Make sure the Anonymous access check box is not selected and that Integrated Windows > authentication is the only selected check box.
http://msdn.microsoft.com/en-us/library/ms998358.aspx
To configure your application to point to IIS
  1. Right click on your web project, and then click Properties
  2. Click the Web tab
  3. Click the "Use Local IIS Web Server" radio button

Things on the Development server

  • A web server
  • A script to migrate from dev to test
  • A script to migrate test to production
  • a script to backup your svn to S3 or similar offsite backup storage
  • a good text editor
  • sed, awk and ruby for the really hard scripts
  • postmortem debugging tools, for Windows that is:
    • umdh (for memory leaks)
    • drwtsn32 (for crashes),
    • cdb (to get minidumps from hung apps),
    • windbg (to inspect the minidumps).

set up a team development testing environment

Ideal for Microsoft Technologies is TFS (Team Foundation Server), which has all the features you want.
In case you don't want TFS, try this:
Version control system
Bug Database / Project Management / Tasks
Developers environment
  • Dual screen
  • Powerful PC
  • Quality chair
  • Whiteboard
  • Free coffee

Development machine: Visual Studio  + VisualSVN/TortoiseSVN + Resharper
Buildserver: Teamcity
LAN testing server: Webserver with build by buildserver + DB with daily copy of live
QA/Staging depends on the project size.