ArtinSoft's Blogs

Software Migration Experts
Welcome to ArtinSoft's Blogs Sign in | Join | Help
in Search

Mauricio Rojas Blog

November 2006 - Posts

  • Safe Migration to VB.NET

        My colleague Juan Pastor forward us an interesting link. It was called "Safe Migration to VB.NET". By Phillip Munce.
    He provides an interesting point of view of how to address a migration. He's approach is based on the Agile Development strategies.
    Mainly he states that a good way to address a migration project is developing a set of Unit Test cases. For which you could use either NUnit or the Visual Studio Team System.
    In that way is easier to establish a measure that let's you know when the project is migrated if it meets the original application test cases.
    He also sees it as an oportunity to document and improve maintability for the application.
    Here at Artinsoft we also give special attention to testing and the establishment of the test case scenarios because they are our main tool to determine the "Functional Equivalence"
     of the application being migrated which is the goal of most of our clients.
    Testing is not always appreciated by developers but as applications grow and maintability becomes complicated, it is harded and harder to keep track that new functionality and patches do not destroy the rest of your application.
    Take a look at Phillips Blog here.
  • Creating a Scheduled job in ORACLE

    This is easily done with the Oracle 10g interface, there is a nice article that explains that in at this address

    However sometimes you don't have access to the Administrative UI. Is there another way to create or schedule jobs?

    Sure just use the he DBMS_SCHEDULER package.

    There are several things you should do:

    1. GRANT CREATE JOB TO MYUSER;
    

    2. ALTER SYSTEM SET RESOURCE_LIMIT = TRUE;
    

    3. Create Scheduler Program:

    BEGIN
       DBMS_SCHEDULER.CREATE_PROGRAM(
          program_name=>'MYUSER.PROGRAM1',
          program_action=>'begin
             INSERT INTO TABLE1
             SELECT * FROM TABLE2;
             end;',
          program_type=>'PLSQL_BLOCK',
          number_of_arguments=>0,
          comments=>'Loads a table from another',
          enabled=>TRUE);
    END;

     4. Create a schedule program:

    BEGIN
       sys.dbms_scheduler.create_schedule( 
          repeat_interval =>   
             'FREQ=DAILY;INTERVAL=2;BYHOUR=18;BYMINUTE=0;BYSECOND=0',
          start_date => 
             to_timestamp_tz('2006-11-22 US/Eastern', 'YYYY-MM-DD TZR'),
          comments => 
             'Schedule for periodic loads',
          schedule_name => '"MYUSER"."DOLOADS"');
    END;

     

    5. And finally link both together to create a JOB:

    BEGIN
       sys.dbms_scheduler.create_job(
          job_name => '"MYUSER"."JOB1"',
          program_name => 'MYUYSER.PROGRAM1',
          schedule_name => 'MYUSER.DOLOADS',
          job_class => 'DEFAULT_JOB_CLASS',
          comments => 'Loads a table',
          auto_drop => FALSE,
          enabled => TRUE);
    END;

    At least this is how I did it. This is just a quick summary of the following article:http://www.oracle.com/technology/oramag/oracle/04-jul/o44tech_dba.html

     

     

  • AJAX in ASP.NET


    ASP.NET AJAX 1.0 Beta 2 (formerly code-named “Atlas”) is now available for download.

    ASP.NET AJAX allows creating great responsive interfaces. I think this framework was previously called “Atlas” you might even find a document on the site describing how to migrate your Atlas applications to this release. http://ajax.asp.net/files/Migration_Guide.doc

    Recently I reviewed the samples at http://ajax.asp.net/ajaxtoolkit/. These are some of my impressions:

    Accordion



    à à

    AlwaysVisibleControl


    Animation


    I t allows to add effects to pages, the examples popups a region. You can do a lot more.

    CascadingDropDown


    This is very simple a common scenario where the combo box values depends of what you select on another combo.

    CollapsiblePanel



    It adds an widget to the panel that allow it to collapse.

    ConfirmButton


    Just for the typical are you sure!

    DragPanel


    Cool!! It lets you create windows that you can drag around.

    DropDown


    Add a nice style of menus




    DropShadow


    Mmm just add a shadow to your panels

    DynamicPopulate


    :/ it just like a way to generate something in the server with ajax. I really don’t get it a lot.

    FilteredTextBox


    Client side validations

    HoverMenu


    I think is handly is a way to display additional info for web page element and only show them when needed

    ModalPopup


    I like this!! It really lets the user focus on what you want


    MutuallyExclusiveCheckboxes.


    Not that sexy but useful in some cases when you have several check boxes options and some contradict the other.

    NoBot



    This control avoids entries by automated processes (BOTS)

    NumericUpDown

    The name says it all

    PagingBulletedList


    I have never needed this but looks nice


    PasswordStrength


    Nice. It gives feedback to the user indicating if his/her password is good enough







    PopupControl


    Nice!! It adds popability to any control. You can use it to make data entry easier

    Rating


    Jejeje Starts rating control

    ReorderList


    Is a list where you can drag the items to reorder them and the datasource will be updated

    ResizableControl


    Great! Resizable images and text containers. I suppose it can be also applied to other things.

    RoundedCorners


    :/ not very exciting just adds rounded corners to panels

    Slider



    Slider controls

    TextBoxWatermark


    Displays a message in a textbox before the user enters some text. After he enter the text the message disappears.

    ToggleButton


    Modifies checkboxes to use images

    UpdatePanelAnimation


    Adds effects to panels things like fade and Collapsing and background changes

    ValidatorCallout


    Very nice



  • MSBUILD

    MSBuild

    Microsoft has develop the Microsoft Build Engine (MSBuild). This is the new build platform for Microsoft and Visual Studio. It is an XML configuration (very similar to other build tools like ANT) It allows to orchestrate and build products in build lab environments where Visual Studio is not installed.

    It is a great aid with other tools like CruiseControl.NET, relation that I will further elaborate in other posts.

    The following is very simple MSBuils script

    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

    <PropertyGroup><OutputPath>.\bin</OutputPath></PropertyGroup>

    <Target Name="HelloWorld">

    <MakeDir Directories= "bin"/>

    <Csc Sources="HellWorld.cs" TargetType="exe"

    OutputAssembly=".\bin\HelloWorld.exe" />

    </Target>

    </Project>



    This sample shows the basic structure of an MSBuild. This is a very basic script maybe not very useful, but general scripts will be made up of Several Targets, Properties and some dependencies between them.


    Properties

    To define properties just define your tags inside a <PropertyGroup> Tag. If you want for example to define an OutputPath property just do something like:


    <PropertyGroup><OutputPath>.\bin</OutputPath></PropertyGroup>

    And to use it just reference it as $(OutputPath)


    Groups of files

    You can specify groups of files with the ItemGroup tag

    <ItemGroup>

    <File_Image Include="$(OutputPath)\Image.jpg"/>

    <cs_source Include=".\*.cs" Exclude=".\Foo1.cs" />

    </ItemGroup>

    And you will reference them like @(File_Image) and @(cs_source).


    Dependencies between Targets


    <Target Name="CreateOutputPath" Condition="!Exists('$(OutputPath)')">

    <MakeDir Directories= "$(OutputPath)"/>

    </Target>

    <Target Name="FooCompilation" DependsOnTargets="CreateOutputPath"

    Inputs=" Foo1.cs"

    Outputs="$(OutputPath)\Foo1.exe">

    </Target>


  • Debugging XSL

    Developing XSL can be sometimes cumbersome and tricky. Especially if it is something you don’t do every day.

    Luckily Visual Studio 2005 now provides the an XSL debugger.

    To debug an XSL open Visual Studio and open a Project go to the File Menu \ Select New File and Create a New XSLT file.

    Write your XSL file.

    You can set breakpoints just by clicking on the left side of the editor just like you do for VB.Net of C#.

    Now to test it right click on the editor and select properties:

    In the properties for the XSL type a name on the

    The XML menu provides two options:

    The Show XSLT output will run the complete XSL and let the XSL Output in a new window. The output by default is not formatted. You can go to the Edit\Advanded\FormatDocument option to format it.

    The Debug XSLT option will start the debugger and stop in the breakpoints you specified.

    Press F10 or F11 to dig into the file. You can use the call stack windows and even the vales for variables in the Quick Watch and Watch Windows.

    You can write XPAth Expression in the Quick Watch Dialog.

    There are three special values that are handy when debugging:

    last() is the context size, position() is the position, or index number, of the context node, relative to the context size; and self::node() is the value of the context node.

    And enjoy your debugging experience ;)

  • J2EE and .NET Integration

       Artinsoft provides means to migrated Java Applications to .NET. However as with many medium size to large applications it could be a complex task.
    Sometimes due to cost or time restrictions just a portion of the system is migrated. The migration team analyses the code and determines which are the "connection points" or the areas where both systems are connected and therefore, means must be develop to provide communications between the Java and the .NET world.
    There are many alternatives.
    If you're facing this problem I will recommend the following references:

     Microsoft .NET and J2EE Interoperability Toolkit  by Simon Guest
    He also published an interesting article where he recommends a products like Javena, and JNBridge
    You can also check out JIntegra



Powered by Community Server (Non-Commercial Edition), by Telligent Systems