Re-using existing client application minus Swing.

Our company has developed a desktop application over the years and I'd be comfortable in stating that it's close to legacy status. The application has a Swing View and throughout the years, unfortunately, the BL and the presentation layer has become tightly coupled.
A challenge has been given to me to take this application and make it run as a 'service' (i.e. re-use the BL but without the Swing). I say service loosely here since the requirement is simply to transform the application to either a web-based or a handheld application. The application is fairly big (~1400 classes) so I can appreciate the reason to do so.
I'm looking for suggestions or direction as to how I should approach this task. A re-write is not an option. The application has a lot of code which requires user input (i.e. prompt for this, then prompt for that)
I'm not well versed in the innards of Swing although I have one idea which entails redirecting all ui calls to a handler of some sort (i.e. override all relevant methods in JPanel and rather than displaying to the screen, I'd create and XML representation of the panel and send it to a handler). The application would be running on the Swing Thread therefore only one application per client (which is ok)
Are there any tools/libraries out there that will do this or something similar?
Any suggestions to alternative solutions is greatly appreciated.
It sure sounds messy and I'm not looking forward to this.
Many thanks.
Marc

The basic approach is to separate UI from BL one
panel at a time.
When I say the BL and the UI is tightly coupled, I don't mean we have BL in our UI...we simply make several calls to the UI within our BL.
1) BL decides to display a prompt to allow user to enter Customer ID
2) Once panel returns, BL decides that Customer has more than one account
3) BL displays a prompt to allow user to chose a Customer account
4) Panel returns a Customer account ID
5) etc...
Create a data transfer object to hold the data that's
entered on the screen. The only role of the GUI
panels will be to display and enter data. Define the
interactions between it and the business logic.
I don't think this will solve my problem since we're not performing any BL (for the most part) in the UI Layer. I just want to swap the UI Layer...that's why I was considering overriding key methods in the Component.class and instead of displaying the ui, I'd use reflection and recreate an XML version of my panels and send that over to either a web interface or a handheld device for input. That way I wouldn't have to modify the BL at all.
If you're moving to a "service oriented
architecture," then you're largely constrained to
request-response operations. If your current GUI has
a lot of buried interaction (eg, selecting a value
from one list populates another), then you have to
give some real thought to how this applies to the
SOA.
I'd start poking around Martin Fowler's website ...
aside from being a/the major evangelist for
refactoring, he has worked with just these sorts of
separation issues.
http://martinfowler.com/
Thanks for all your suggestions.
Marc

Similar Messages

  • Use of java application w/ Swing component causes Win95 system to freeze

    Hi All,
    Until yesterday, we were having a major problem that whenever we ran a java applet or application that used Swing, the Windows 95 systems would freeze tight and require a reboot.
    I had tried everything from loading the J2RE, Windows Sockets 2, J2SDK, none of which helped with the problem.
    What we found out yesterday is the Windows 95 machines that were freezing didn't have DirectX on them, and that when DirectX 8.0a was installed, the freezing problem went away.
    Just thought I'd share my success if anyone else is now struggling through the same items.
    Bruce

    hii,
    Well although the reply is litle bit late but i just wanted to thank you for your idea in installing direct x it worked fine also with a windows 2000 and 120 ram
    laterzzz

  • How to setup Data services to use existing zend application

    The application I'm working on is going to have views created both in Flex and in PHP. Thus, we want to setup the Zend framework so that it can be used for the PHP part of the application and to display views in the browser. We want to setup the AMF gateway so that it's a service provided through a controller in Zend and with the actual service classes hidden from public view in the application folder, and not like the default now seems to assume that you create a folder in your public webroot where the endpoint and all service classes live.
    So the structure we are after is
    Zend_AMF endpoint at http://example.com/services/amf
    Zend folder structure:
    application/controllers/ServiceController.php    // the controller that handles all incoming requests, so acts as the gateway.phpI assume
    application/services/amf/    // contains the actual service classes, e.g. Users.php, Products.php
    public/swf/    // will contain the actual .swf files for the Flex application
    the /public/ folder is set to the webroot with /application/ outside the webroot as per the Zend framework recommendations.
    I would like to use the Data service introspection to generate the Flex code for the services, however the introspection afaik requires the services to be in the /public/ folder or a subfolder there. So how can I make introspection work for a service that lives in /application/services/amf and is accessed through http://example.com/services/amf ?
    Suggestions? links to tutorials?

    Yes, well hopefully this will be supported in the future. In the mean  time, I've noticed that it's only actually when creating the service  and the API for it that you need to have the class inside the web root.  In order to configure the return types and input types you don't need to  go through the standard gateway.php anymore. So, although not ideal,  here's how I do it right now:
    1. I have set up m zend  framework as described in my first post, with my AMF service gateway being a Zend controller and not the gateway.php
    2. I create the service class with the API I need inside the application/services/amf folder. If the service needs to connect to the database then I create a Zend Db Model using the zf command line tool (as per Zend framework practices) and then hook my service class to use that. Which basically means that my service classes are very slim and simple.
    3. When I created the Flex project I created a dummy service using the sample  php, which has set up Flash builder with the default gateway and so on
    4. Once I've created my service class, I copy the file to the default location where Flash Builder wants to create my services. I then strip out any implementing code from the copied file, leaving only the public API and empty methods.
    5. I then create a new service in Flash builder, point it to the stubb class in the default location and let the introspection discover the public api. This will of course mean that all input values and return values are generic objects.
    6. After this is done I delete the stubb class. In the created AS service class I override the service endpoint so that it points to my real gateway controller within the zend framework.
    7. After this is done I can configure the return types and input types using auto discovering. It will connect to the real gateway and ignore the default gateway and thus I can develop against the real endpoint and don't need to create my service classes within the public location of the Zend folder structure.
    It's a bit of a workaround for sure, but since I don't create new services that often and I can have Flash builder update my return types etc. automatically this way, I figure it's worth the extra steps. Still, I would hope that in the future Flash builder will support having the introspection happen on a location outside the projects own web root.

  • When browsing documente library contents from client application, cannot see all files

    We are currently running SharePoint 2010 Enterprise in a small environment. On one of my sites, I have a document library with various documents uploaded (docx, xlsx, pdf). I am unable to see all the documents when browsing the library from Word/Excel/Adobe
    Acrobat. For example:
    - At the root level of the library, I have 5 folders
    - In Folder 1, I have 10 PDF files
    - If I go into Adobe Acrobat 11, for example, and paste the address of my site in, I can see the library and I can click on it and see the 5 folders.  If I click on Folder 1, there are no PDFs listed.  Even changing File Type to "All Files"
    still returns 0 results
    Things I have tested:
    If I view the library in the browser, I can see the 10 PDFs in Folder 1.  They are not checked out and they are visible to everyone
    If I click Library>Open w/ Explorer, I can see all 10 PDFs in Folder 1
    If I try using other client applications (Word, Excel, etc..), I cannot see any files in Folder 1, even when I change the File Type to "All Files"
    If I click in some of the other Folders in the same library from within a client application, sometimes I can see the files but most times I cannot
    What could be causing this?  I do not see any errors in any of the event logs.

    Hi Sephiroth,
    I think my observation is when you browse from word/Excel/Adobe it is taking your local system credentials and so  not showing files when you access.
    local system account means the account which you used to login to the system.
    For example,you logged into the system as contosomo\xyz and you are trying to connect to the site using Contosomo\setup account,what my point is though you logged in to the site using the setup account site is taking your xyz account credentials and so it
    not showing any files as xyz obviously will not have access.
    To confirm this, you can try by giving atleast read access to the local system account (in this case xyz) to the library and then test again whether you are able to see the files or not.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem.
    s p kumar

  • Error in Application.Run(DisplayLoginForm) and Remote Authentication in SharePoint Online Using the Client Object Model

    Hi guys
    I Think that is a simple error, but I don’t have enough knowledge in .NET apps.
    I make an console app that use Remote Authentication in SharePoint Online Using the Client Object Model, that a I downloaded from MSDN.
    This App run ok.
    But when I like to make a Windows From App. This component send me an error in Application.Run(DisplayLoginForm)
    This err msg :
     An unhandled exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll
    Additional information: Starting a second message loop on a single thread is not a valid operation. Use Form.ShowDialog instead.
    Is there any way to use a form inside a windows form?
    Thank in advance
    Ramiro
    Ramiro B

    Hi,
    Based on the error message, please do as following:
    1. Check your code logic below:
    void btn_Click(object sender, System.EventArgs e)
    Thread t = new Thread(StartMyForm);
    t.TrySetApartmentState(ApartmentState.STA);
    t.Start();
    public static void StartMyForm()
    Application.Run(new MyForm(..));
    2.Try to add the following code line in your code.
    Application.Restart();
    If the issue still exists, please provide your requirement and code for a further research.
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Using existing Application Modules Entities in web service provider

    Hi, I want to implement a web service provider having a WSDL file and using JAXWS.
    Is it possible to use in input methods of the service, an Application Module or Entities or View Objects that exist in a separate project.
    I want to perform database operations and facilitate transactions using existing ORM mapping of ADF.
    Thanks,
    Ilias Stavrakis

    Yes, it is possible, but you have to checkout and release the ApplicationModules manually. Use the method <tt>Configuration.createRootApplicationModule(...)</tt> of the class <tt>oracle.jbo.client.Configuration</tt> to checkout modules, and use the method <tt>Configuration.releaseRootApplicationModule(...)</tt> to release it back to the AM pool at the end of processing.
    See this blog entry http://jobinesh.blogspot.com/2010/04/invoking-applicationmodule-from-servlet.html despite the fact that it is not directly related to Web services.

  • How to use Portal SSO with existing BSP application

    Hi all,
    we run SAP EP 6.0 here and have a single start BSP page of
    an application integrated with the SAP appintegrator for BSP. The rest of the existing BSP application still uses
    the login functionality based on CL_BSP_LOGIN_APPLICATION
    and is not integrated in the portal.
    Problem: If a user directly accesses one of the "old" BSP pages, he should be redirected to the portal to auth. him via SSO and afterwards the original BSP page with all its parameters should be processed.
    How to deal with that? Is there a similar mechanism like with the BSP_LOGIN_APP in between for the SAP EP?
    Thanks for your help!
    -RAINER-

    I think that doesnt solve the problem.
    I have 2 systems: SAP ECC with all BSPs and the portal on another system. So I have to entry points: Via portal using the appIntegrator BSP or directly to the ECC.
    As-is: If the auth. for the BSP appl. fails, the user is re-directed via the error page given in the service (SICF)
    to a BSP login app. and from there to the requested page.
    No portal in this concept.
    Must-be: A user is still able to directly access a BSP on the SAP ECC by entering the URL in the browser. It's not a must entering via the portal first.
    So when the login failed on the ECC (no SSO ticket), he should be redirected to the portal for getting his SSO.
    After he signed in successfully the user will be forwarded to the BSP page he entered in the browser the first place.
    I can't see a way to use the URL iView. I am thinking of simply changing the login mechanism of the BSP using the portal login functionality.
    The link you gave me offers an implementation of CL_ICF_SYSTEM_LOGIN. Any ideas?
    Regards,
    -RAINER-

  • Using database views in ADF mobile client application

    Hi,
    I am using Jdeveloper 11.1.1.4 and WLS 10.3.4.
    I have developed a POC in ADF mobile client application both with and without synchronization. However, both work with entity objects based on tables.
    I need to use database views instead of tables. When I try to include entity object (based on views) in the view object, it shows an error saying "Only the entity objects based on tables can be selected"
    Please guide me if there is a work around for this.
    Also, please let me know if there is way to develop an ADF mobile client application skipping the use of entity objects at all and using view objects directly to specify the database query and fetch data from the database.
    Thanks in advance.
    Ansh
    Edited by: ansh on Mar 28, 2011 5:40 AM

    Hi, Ansh:
    Currently, out of box, ADF Mobile Client does not support synchronization against Database Views. This is because Mobile Server imposes some schema restrictions to ensure synchronization with multi-table views would work correctly. This schema restriction requires, for example, the view must have a primary parent table with key defined, and also all base table must be included in the data publication. These dependencies requires manual resolution and advanced planning, and is managed outside of the ADF Mobile Client/JDeveloper project.
    To continue development, you would need to create server Entity Objects directly against the base tables. You can then create the mobile ADF Business Component (EOs, VOs, etc). You can then create View Objects in your ADF Mobile Client application based on the database views, in order to retrieve the data you need exactly. In other words, instead of basing EO on the database view, create View Objects in the mobile applicaiton to mimic what you had in the View Object.
    Is there any other reason why you would need to access data via database views, instead of directly against base tables?
    Thanks,
    Joe Huang

  • Use Sun Java Studio 2 with Existing Java Application

    I have started using Sun Java Studio 2 and having fun and little difficulty creating a new Java web application from scatch. My question is where do I find information on Java Studio configuration to allow Java Studio to load up and modify Java server pages/forms in an existing Java application that I did not write?
    The Java application has been created with Javabeans and using BEA Weblogic version 7, with a SQL-Server 2000 database backend.
    Below is a bit of code out of one of the main Java forms.
    <%@ page buffer="256kb" autoFlush="false" errorPage="../../common/system/error.jsp"
    import="psdi.jsp.beans.*, psdi.jsp.common.*, psdi.jsp.app.wotrack.*, psdi.jsp.util.* , psdi.mbo.* , psdi.util.* "%>
    I have looked around and have not found what I need to setup in Java Studio to allow me to load up a form and view it in the Visual designer, I keep getting errors on the psdi. references and cannot load up any pages.
    I see on the server install ia folder under the main root <DIR> called <apps>, and inside the <apps> folder is a folder called <jsp> and in the <jsp> folder are sub folders for each main module within the application with all the related .jsp files. I have been manually editing the .jsp files using Windows Notpad and saving the changes. Then I rebuild the .ear file and my changes work fine. Since I have a lot of changes to make there has to be a better way than using Notpad.
    My hope is somewhere is a point-by-point document on what to so I can use Sun Java Studio 2 to make my changes in a visual IDE.
    Any assistance would really be appreciated.

    Hi Giri,
    Yep, this I know,b ut when I do I get errors messages and am looking for some form of point-bypoint instuction that better explains how to setup up custom libraries in Sun Java Studio, custom tags, etc.

  • I want to build android application using existing desktop dimension fla files. so for this I am resizing existing desktop dimension fla files to mobile dimension files but during resizing some files are resizing properly but most of the files the content

    problem definition:
    To build android application using existing desktop dimension fla fies , I am resizing that files to mobile dimension and publishing with air fo android 16  . In this process some fla's are not resizing properly I mean the content is not matching with stage
                      In one post I saw that by copying frames in movie clip we can adjust with stage . I did this and made an application but the swf's which are following the movieclip resized swf are going out of stage
    development tool : adobe flash professsional cc
    extension : air for android 16
    original file dimension: 800 * 600 px
    new dimension required is : 2650 * 1600 px ( to get full screen view)
                                           anyone please suggest me to solve this problem
    when I resized using copy frames in movie clip the output swf is coming with white screen . If I played with package it coming properly but the files which are following this are going out of stage
    Thanks&regards
    K.Niranjan

    problem definition:
    To build android application using existing desktop dimension fla fies , I am resizing that files to mobile dimension and publishing with air fo android 16  . In this process some fla's are not resizing properly I mean the content is not matching with stage
                      In one post I saw that by copying frames in movie clip we can adjust with stage . I did this and made an application but the swf's which are following the movieclip resized swf are going out of stage
    development tool : adobe flash professsional cc
    extension : air for android 16
    original file dimension: 800 * 600 px
    new dimension required is : 2650 * 1600 px ( to get full screen view)
                                           anyone please suggest me to solve this problem
    when I resized using copy frames in movie clip the output swf is coming with white screen . If I played with package it coming properly but the files which are following this are going out of stage
    Thanks&regards
    K.Niranjan

  • Access denied when opening project using project professional client application

    Hi,
    I have some users who are members of 'Team Members for Project Web App'.
    They can open projects using the browser just fine.
    But, if they try to open it using the menu  :  Projects Tab > Open > In Microsoft Project,
    the project professional client application starts but shows an error : 'you do not have the required permissions to perform the operation'
    Is there some restrictions for 'Team Members for Project Web App' with the project professional application?

    Indeed team members should not be added to the PM group. But they should not either edit directly the proejct plan. The process is the following:
    The PM assignes a resource on a task, either from PWA or MS Project Pro,
    The PM publishes the project plan,
    The TM goes to the task link in the quick launch menu on the left side,
    The TM enters the actual work done on his assignments and submit it to the PM,
    The PM goes to the approval center, sees the task updates waiting for approval, approves or rejects the task updates,
    The PM opens the project plan, updates the remaining work and publishes again the project the the task updates are taken into account and send to the TM.
    See this
    reference for Project Server 2010 but still applicable for 2013.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Can i use the maps application already existing on my i phone in an offline mode?

    can i use the maps application -already existing in iphone 4- in an offline mode?

    No. It downloads the maps as it needs them.
    A very small portion of the map is cached in memory when offline, so you can see the last area you looked at, but as soon as you want to move the map, or look elsewhere it will need an internet connection to download from Google.
    There are standalone map apps available in the AppStore if you search for the area you want.

  • Refresh Planning application using batch client

    Hi All,
    I'm trying to refresh the planning application using batch client and I'm not winning so far.
    This is what I have in my script.
    Execute Deploy
    Parameters(ApplicationName, InstanceName, Refresh Outline)
    Values('MyAppName', 'MyInstanceName', 'True');
    Error: [Line 8] The application name MyAppName is invalid for instance with name MyInstanceName.
    This is what I had earlier:
    Execute Deploy
    Parameters(ApplicationName, InstanceName, ApplicationServer, HubProject, Refresh Outline, ClearAll, CheckIntegrity, waitforcompletion, purgeTransactions, escapeValidateRules, deployOption)
    Values('MyAppName', 'MyInstanceName', 'MyApplicationServe', 'Default Application Group', 'True', 'false', 'false','true', 'False', 'true', 'AppView');
    Error: 2010-09-01 14:17:29,406 ERROR Unable to delete application MyAppName due to following reason: Cannot Deploy the Application, It is already deployed.
    Any Ideas?
    Thanks

    I changed 'Execute Deploy' to 'Execute Redeploy' my script ran successfully

  • Telnet Client Application using J2ME

    Hi all ,
    we are implementing RFC 854 a Telnet Client Application using J2ME.
    we used socket connection and able to get the connection and response,then telnet server is asking to enter username, when we enter the user name it's taking the user name asking to us to enter the password ,when we enter the password it's giving garbage value in Nokia Devices but working fine with Sony Ericsson devices.please suggest any solution why it's giving garbage value in Nokia Devices.
    this is very urgent we are not able to track the problem.
    Thanks and Regards
    Srikant Bureddy.

    did you check *[Forum Nokia - Mobile J2ME Applications|http://www.forum.nokia.com/Technology_Topics/Development_Platforms/Java.xhtml|Nokia resources]*?

  • Using flex for thik client application

    My application is an C++ thik client application. It uses
    some king of lib (called zaf) for the UI.
    Can Flex be used for handling the UI of desktop application
    ?

    You could use AIR (Adobe Integrated Runtime), in which most
    of the app is created in Flex, and some in AIR extensions, but
    there would be limitations. You can't execute native applications
    from AIR applications, so you can't execute Perl scripts, Java
    apps, etc. from your AIR app. You can of course use FDS (Flex Data
    Services) to connect to POJO, EJB, JavaBeans, SOAP and other web
    services, etc.

Maybe you are looking for

  • Looking for a way to optimize firefox for dsl

    i recently switched from cable to dsl. during the setup a small app from at&t tweaked ie8 to optimize the browser for dsl. ie8 now loads pages faster than firefox 3.6.8! is there an add on or set of tweaks that i can apply to optimize firefox ?

  • What is a common way to create audio chat rooms?

    What is an expected way to create audio chatrooms? Either try to mix all published audio streams into single one and republish it under common name? Or just inform all clients about each other and allow each one to connect to a stream, published by e

  • Parallel running of process and Roi?

    Hello, i have two questions: 1. how can i run two process in parallel in labview,which one process is webcam that stream video,and the other process is image snapshot from the video       (i want to snapshot an image after selecting a ROI from the li

  • Self-running presentation with transitions & animations on web?

    I want to create a self-running presentation with transitions and animations that I can post on a web site, ideally as a Flash file.  Is this possible with Keynote?  What are my options?

  • Dear Adobe. There are certain features on behance that are not working since you took over.

    I used to be able to organized my projects by just dragging them into place. Now, I've dragged a project I want to be seen first to the 1st spot and when I reload, it goes riiiiiight back to where it was. Also, the prosite is giving me a lot of troub