Best way to structure Business Logic

Hi Experts,
I am using Web Dynpro for my front-end and application services for the back-end. Which of these is the recommended way to structure the layout of my business logic:
1) Keep everything in the 'src' folder of the CAF ejbmodule. Structure through the use of packages.
2) Create an external Java DC, keep all code in there and call the code from the application services. Structure code through both packages and the use of multiple DCs.
3) Create a child Java DC in the CAF ejbmodule project, keep the code there. Structure code through both packages and the use of multiple DCs.
4) Some other way which I do not know of???
I think that (2) is the best way to to this, but I'm not sure and I also don't know how to make the code in the Java DC accessible from the CAF in 7.1. In 7.0 one was required to assemble the Java DC into a J2EE Server Library project and then create the required dependencies. How does this work in 7.1?
Thanks,
JP

Hi JP,
> When you refer to "regular reference stuff" I take it
> you mean the application/library references in your
> 'application-j2ee-engine.xml' file?
Correct.
> Is there an easy way to discover which
> application/library to reference, for example, if I
> wanted to make use of 'com.sap.security.api.IUser'?
>
> It was always very difficult to find the correct DC
> containing the required classes in 7.0 (usually one
> had to use a JAR class finder). Is there an easier
> way in 7.1?
Hmm, I guess it would be a rather tough task to have a mapping between all classes (or even packages) and DCs. However it should be fairly intuitive to infer the DC from the class / package name. If still in doubt, you can search for its usage on help.sap.com - most probably you'll find the DC name as well therein.
> Finally, how about Web Dynpro classes (like
> com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser
> ): I'm not sure if it will ever be necessary, but can
> they be accessed from Java DCs?
According to the <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/javadocs">NW public javadocs</a>, the classes in the com.sap.tc.webdynpro.* packages are "Services in the Web Dynpro runtime environment that can be called by custom coding in Web Dynpro applications", so they're not intended for general use in any type of app.
HTH!
-- Vladimir

Similar Messages

  • The best way to implement business logic to a .JSP ?

    Hi experts,
    I want to implement some business logic to a .JSP file wich is in my modified
    <b>com.xxxNew.portal.usermanagement.admin.pa</b>r file!
    For examle creating different roles for useres by registration dependently what they inseret in the registration.jsp!
    What is the best way to do this? I have tried out to create a stateless session bean for this. Is this the right way?
    Can someone give me information how can I access this bean from my JSP (.par file) and how can I upload it to the portal?

    Hi,
    Here is the document about Calling J2EE Applications from Portal Applications:
    http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/frameset.htm
    So in your JSP do the lookup of your EJB.
    I do not think using EJB at this level is really good, as you do not deal with DB, security and transactions in your code.
    http://www.jguru.com/faq/view.jsp?EID=126400
    Why not just use a portal component like JSPDynpage for this purpose?
    Greetings,
    Praveen Gudapati

  • What is the best way to create business documents in CRM

    Hi All,
    What is the best way to create business documents like contract, sales order, debit memo etc in CRM ? Unlike R3 we can't use our good old BDC with recording. Moreover for most of them although there are Business Object but no BAPI to creation so what is the way ? I found in SDN there are two MAGIC Function module CRMXIF_ORDER_SAVE. Do I need to that alawys ?
    Is it nees to via IDoc and cannot be done just by calling from ABAP program ? The input parameter of the FM is a complex deep structure.
    Please help.

    Ashim,
    Try looking at the program:
    CRM_TEST_ORDER_MAINTAIN
    I think that should help you figure out the parameters.
    Good luck,
    Stephen

  • Where is the best place to implement business logic in ADF application?

    I am using jdeveloper 11g R2 , JSF Facelet
    Where is the best place to implement business logic in ADF application?
    I mean something like service layer in Spring
    Appreciate your comments
    Regards
    Mohsen

    Depends on what your logic does and what data it deals with, but in general business logic is in the ADF BC layer.
    Some goes into entity objects - for things like attribute or row validation.
    Some goes into view objects - for things like calculation.
    Some goes into AM - for things like service methods for UI clients.

  • What is best way to make business cards in iwork

    what is the best way to make business cards.  is have iwork.  the business card templet doesn't seem to copy after you create the first card.  it wants each card on the temp. page to be filled in.

    You can buy a set of backup disks from Adobe for a nominal fee. You might want to give them a call and ask about it.
    Otherwise, just back it all up to an external drive.
    Bob

  • What's the best way to (re)install Logic Studio? Need Help.

    I bought Logic Studio a few months ago and installed it on my new MacBook Pro 2.4Ghz with 2G Ram, 160G hard drive @ 7200 rpm. Being new to Logic, at install, I just put all 40+ gigs of content on the computer. After a while I considered putting the Apple Loops (roughly 12gigs) onto an external hard drive to save space on my computer, just to see if it would work, then consider moving more content over later. After doing this the Logic application couldn't find the Apple Loops, and I couldn't find a way to help it see the new path, so my Apple Loops were essentially rendered useless (since I had already deleted them from the computer). So I stopped right there, and haven't done anything else. Just worked with Logic without using Loops, which I have to say is still an incredible program.
    What also seemed strange was this: In moving the Apple Loops, the available disk space on the computer didn't seem to change much. It went down a few gigs, but not the 12 or so I was expecting. Not sure why that is. It seems like Logic and all the content is actually taking up around 50 gigs or so on my computer (and the Apple Loops are supposedly gone or not available). What is that about?
    Feeling like I had really fouled things up, I called Apple Care. They said that the content of Logic is stored in many places in the computer's libraries and system folders, but it was really confusing trying to locate all of it, because the info they sent was from Logic 7 and older versions of GarageBand. I guess Logic 8 is too new for them to have anything on it. There is no uninstall for Logic Studio. But they strongly recommended that I perform an Erase and Install, and then re-install all my software including Logic, and then assign the hard drive I wanted the content in. That would open up a lot of the computer's hard drive space, they said. It seemed like an extreme measure to take for such a small blunder, and I haven't tried it yet, but will if it's the best option.
    If I do this, is running Logic content (i.e. Loops, Impulse Responses, Jam Packs, etc.) from an external hard drive (and the one I have to use is 5400rpm--is that too slow or am I getting too picky?) the best way to go, or should I have all Logic material coming from the same machine? How do I get some of my hard drive space back?
    Ugh.
    Has anyone out there experienced this too? Is there anything documented about where the content is stored for Logic Studio? Is Erase and Install really the best thing to do in this situation?
    So many questions...
    Thanks.

    Hey Blue,
    Let me see if I can help you a bit.
    Logic Studio has 28+ gb of loops. Almost 23 for STP and 6 for the Jam Packs, etc. They should be located in /Library/Audio/Apple Loops/Apple (that's the default install loc.). Copy them to an external drive and then delete them from your main drive. Go to /Library/Audio/Apple Loops Indexes and delete those text files. Now go to /Library/Preferences/Soundtrack Pro and delete those text files, too (more Loop Indexes).
    Now open Logic Pro and it will say 'No Apple Loops found'. Click 'OK' and then open your Loop Browser. Drag all the Jam Pack folders, STP folder, etc. that you want to use onto the Loop Browser. Logic will ask you if you want to 'Copy to Loops Folder' or 'Current Location'. Choose 'Current Location'. Logic will now index the loop folders.
    NOTE: You can change the names of the folders to suit your liking. For example: I added the 2, 3, 4, 5 after the Jam Pack names to make it look smoother on the popup menu and changed iLife Sound Effects to Sound Effects - iLife and Apple Loops for STP to STP. Now the Jam Packs 1-5 come up first on the popup menu and the FX stay at the bottom. I likee!!
    Now, if you like you can take your EXS Factory Samples and Ultrabeat Samples, 3.35 & .889 gb respectively, and copy them to an external drive. I have mine in the same place as my Jam Packs, etc. You can find these files in /Library/Application Support/Logic. Toss out the originals and put ALIASES from the external drive back into the /Lib/App Sup/Logic folder.
    Also, if you open STP and click the Search tab in the right pane you will see a button that says 'Setup' next to it. Click that and you can use the checkboxes in the window to activate/deactivate any of the loop folders available.
    A clean install is the best IMO if you have a little time because a) you DO NOT have to install GB at all (that saves the .aif file size - Logic Studio uses .caf files at half the size of the originals) b) Logic Studio will install the extra GB or Logic 7 content if you need it at it's reduced size. It will basically get rid of all the old clutter that you do not need. Only install what JP's you want and move the bigger stuff to an external.
    Rock up Logic and it should all be in place. That procedure saved me 32.5 gb on my main drive.
    NOTE #2: You have another 12 gb (if you installed all Jam Packs) that reside in the /Library/Application Support/GarageBand/Instrument Library/Sampler. These are the Jam Pack Instruments & Sampler files for World, Symphony, etc. They cannot be moved from the startup HD (as far as I can tell). So keep that in mind if you don't want a certain JP.
    Hope that helps,
    Dave

  • Advice on best way to structure flash movie

    Hi,
    I'm a little mixed up on the best way to approach this movie I need to make. Basically it includes a loading screen, some narrative sections, and a few interspersed interactive sections (a couple of quizes and some forms to fill out).
    I'm thinking because of the complexity I should seperate it into "scenes" but my understanding is scenes are bad, so I'm thinking I should be using movie clips for each major section?
    I also want to have a controller for skipping forward and backwards,  so let me see if I have this correct.
    Would I have one master timeline with all my actionscript and what not and my navigation controller, and would each major section of the animation be a movieclip that would be trigger by a frame in the master timeline?
    I pretty much have the whole thing storyboarded out, I'm just wondering the best most efficient way to do it.
    One other question: is it bad practice to have a raster visual asset with an alpha based mask on the main timeline that overlays on top of all the nested clips? For example I have a "frame" with is an png with a abstract white border with the middle masked out that remains static throughout the entire movie. Or am I better off applying it to each movieclip.
    Thanks.

    It will probably be easier to manage if you make each section a moiveclip by itself,  That way you aren't always manipulating the main timeline to fit in or adjust for changes in each section.  You can either spread them out along the timeline, using frame comands to navigate to the different sections, or you can have them all in one frame and control navigation by controlling the visibility of each section.
    If the frame you mention is to be applied to each section, then having one on the main timeline to cover all would be easier to manage in most cases.

  • Best way to re-install Logic

    I'm about to have my computer worked on and I think I will end up loosing all the data on my computer because of the repair.
    Right now I'm going through my computer and backing up everything I can. Is there a way to copy the LOGIC PROGRAM onto my external hard drive? I have all my Logic files/folders backed up of course, but what about the program itself? Do I have to re-install with the Logic disks like I originally did, or is there another way? Thanks!

    Easiest is using Super Duper or Carbon Copy Cloner, create a clone of your hard drive on your external, and then just reinstall that clone when you get your machine back from repair.
    http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html
    http://www.bombich.com/software/ccc.html

  • Best way to implement a "logical" URL?

    Does SAP provide any equivalent of the FILE transaction and logical file names for URLs?
    My BSP application needs to link to different URLs depending on whether its running in development, QA, or production.
    I would like to do this in the most flexible way possible -- no code changes when URLs change, no custom tables to store URLs, ...
    Best Regards,
    Shawn Searcy

    Thanks for the replies. 
    I will try to be more specific in what I am doing (if you promise not to ask why ;-).
    My BSP application must link (e.g. via hyperlink or redirect) to an ASP.NET web application running in a completely different landscape of non-SAP servers.
    When my BSP application is running in development, I want it to link to the ASP.NET application on the development server in the other landscape.
    When my BSP application is running in QA, I want it to link to the ASP.NET application on the QA server in the other landscape.
    And so on...
    My solution at this point is the following:
    <%
            data logical_url  type FILENAME-FILEINTERN.
            data physical_url type FILENAME-FILEEXTERN.
            data redirect_url type string.
            concatenate 'ZEXTERNAL_APP_' sy-sysid into logical_url.
            call function 'FILE_GET_NAME'
                exporting
                    logical_filename  = logical_url
                importing
                    file_name         = physical_url
                exceptions
                    file_not_found    = 1
                    others            = 2 .
            if sy-subrc = 0.
                redirect_url = physical_url.
                response->redirect( redirect_url ).
    This works fine.  The target URL is 1) determined based on the current SAP system ID, and 2) completely externalized from application code.
    The purpose of my initial message was to find out if SAP had a "new and improved", and possibly more appropriate, mechanism for accomplishing this.
    Regards,
    Shawn

  • Best way to structure Cell contents

    Hi All,
    OK, my last question for the week, and if I can get my head around this, I'd say I had a productive week.
    So, I am working on establishing a basic EDD to be used for making and converting some large documents, many which contain a plethora of tables.
    Many of the tables are for stylized elements like notes, warnings, etc. Also, it is not unusual to have bulleted lists inside the tables.
    I am wondering, do you think I should require that text inside table cells be wrapped in some sort of "paragraph" element? As opposed to allowing it to be wrapped directly in the cell as the default TEXT?
    I'm sure it can be done either way, but wondering if there is a best practice on this. Seems like if it was in a general "paragraph" element, it would make it easier to drag stuff in and out of tables or from one table to another, etc. in structured view. Plus, I'm sure I'll need to wrap stuff as part of the conversion process. But is there a good reason to not do that...?
    Thanks!
    Darren

    Darren,
    In my recent structures I always had tow types of tables: table an simpletable. In teh simpletable structure I allowed no blocklevel elements in the cells, limiting the content to (<TEXT> | indexterm | strong | ... )*. In the regular tables I do not allow simple text content, I require at least a para (or similar block level elements).
    It is my believe that it helps users if elements are either block or inline. It makes everyones live just harder if you have many places where the user is allowed to go either way.
    - Michael

  • What's the best way to use business objet?

    Hi all,
    Anybody can explain what's the more efficient way to retrieve data from the database by using business objects?
    I would like to load business partners information, but I'm using SBob object and recordset and it is very slow...
    If anybody have a sample code to show me..
    Thanks

    Hey,
    Business Objects are best for templating and maintaining data integerty... I only use it for adding, updating, and deletions of BP's... As for retrieval, I believe, please someone correct me on this, but the Business object maintains a semi-connected state that allows for browsing through the data... So fliping and storing each BP could be slow as well... I am assuming that the only way to speed it up would be going direct to SQL or by using DI Server... Again, I am not confident on this so it would be best if someone could provide a second on this... Thanks
    Jeremy Adam

  • Best way to structure multiple track video

    I have multiple tracks of music videos from one concert. I have 7 buttons on main page with one track per button. As it is after one track finishes it goes back to the main screen with all choices.
    I am wondering how I would structure this in iDVD so it can be viewed either in its entirety or by song.
    Thanks!

    This question has been asked a few times, so you might want to search and see the full range of responses. Basically, iDVD doesn't allow you that particular option.
    A workaround is to create two versions of the concert and put both on the DVD (if there's room). The first version is what you have. For the second version, you'd join all the tracks together into one video, and add that to the DVD.
    Note that you can add chapter markers to the second version, and each chapter marker can show up as a menu button in iDVD. It would then function like a commercial DVD, where you could jump to a specific track from the main menu, and then it would play through the rest of the tracks before going back to the main menu (or you can use the remote control to jump tracks forward or backward). If you could be satisfied with this, then you don't need all the individual tracks duplicated on the DVD.
    John

  • Best Practice: Keeping business logic out of the servlet

    In servlet programming, is it considered best practice keep business logic in the helper classes and only have session-related logic in the servlet?

    Yes, it is best to keep your business logic separate from your servlet class, to prevent coupling between your servlet and business logic. Consider using EJB's or the DAO pattern for your business logic.

  • Best way to set up a custom table using dates ytd, quarters, months

    Hello-
    I did post this on the crystal forum however it really involves setting up a good structured table in order to get the data to report on which I think we need to change which is why I'm posting here.
    I am not a dba but I work with crystal reports and we are working together to get data in tables that we can report on.  We are in the process of creating a data warehouse, which will mainly be summarized data we are exporting out of our legacy system and importing into a mysql database.  Most of this data will be summarized by month, quarter and year.  We will have multiple years of data.  A lot of the reports we will be creating will be in a comparison manner such as 2009 vs 2008 or Jan this year compared to Jan last year or list out sales by month Jan-Dec 2009.  I would like this data to be easily displayed on a report in a side by side manner.  To get this result, what is the best way to structure the data in the tables on a monthly, quarterly and yearly basis?  Right now weu2019ve got one field in the table called date (which is a string) which is listed like:
    Date
    2008YTD
    2009YTD
    2009Jan
    2008Jan
    Is it best to break out the date information so that on the report side it will be easier to work with?  Also should this be set up in the table as a date instead of a string?  If so how do you account for a YTD date?  Are we going to need 2 dates, a start and end date to achieve ytd or qtd information?  Do you recommend creating just a date table and if so how would that be structured?
    So for reporting purposes, using crystal reports, I would like to display comparison data on a report side by side, for this example this year goals compared to last years goals by goal code A-Z (which is a credit code, goals are for the # of credits by code for the year).  The end result I would like is to look like this:
    code   2009 goal   2008 goal
    A        25              20
    B        50              60
    C        10              15
    However the data looks like this (displaying all of the 2009 data first then the 2008 data, not side by side which is how it is in the table):
    code   2009 goal   2008 goal
    A        25
    B        50
    C        10
    etc to Z
    A                          20
    B                          60
    C                          15
    Right now the data is structured in the table like:
    Code  Goal  Date (this is currently a string in the db)
    A        25     YTD 2009
    B        50     YTD 2009
    etc. A-Z for 2009 then:
    A        20      YTD 2008
    B        60      YTD 2008
    Any thoughts on strucuting a table would be appreciated.  thanks.

    Jennifer,
    Most of the DW examples I've seen use a dimDateTime table in the database. That table has multiple columns related to the specific time... For example, here are the columns that are in the, SQL Server sample database, "AdventureWorkdDW"... "DimTime" table
    COLUMN_NAME             COLUMN_INFO
    TimeKey               (int, not null)
    FullDateAlternateKey     (datetime, null)
    DayNumberOfWeek          (tinyint, null)
    EnglishDayNameOfWeek     (nvarchar(10), null)
    SpanishDayNameOfWeek    (nvarchar(10), null)
    FrenchDayNameOfWeek     (nvarchar(10), null)
    DayNumberOfMonth     (tinyint, null)
    DayNumberOfYear          (smallint, null)
    WeekNumberOfYear     (tinyint, null)
    EnglishMonthName     (nvarchar(10), null)
    SpanishMonthName     (nvarchar(10), null)
    FrenchMonthName          (nvarchar(10), null)
    MonthNumberOfYear     (tinyint, null)
    CalendarQuarter          (tinyint, null)
    CalendarYear          (char(4), null)
    CalendarSemester     (tinyint, null)
    FiscalQuarter          tinyint, null)
    FiscalYear          (char(4), null)
    FiscalSemester          (tinyint, null)
    Then all of the fact table receive their date stamps by linking back to this table, using the TimeKey as a foreign key.
    HTH,
    Jason

  • What is the best way for my partner and I to share our work across computers?

    What is the best way for my business partner and I to share our work (projects, libraries, images) across computers without emailing items?  Is there creative cloud storage place we can share?

    Can't I just purchase the 200 GB storage, throw our photo library in it, share it with her, and have both of our new and future pics dumped into it?  If so, how do I do that?
    The iCloud Photo Library cannot be shared between users, unless you are using the same AppleID.
    You can share selected photos with shared albums:  iCloud: iCloud Photo Sharing FAQ
    Or create a Photos library on an external drive, that you both can access, as described here for iPhoto:   iPhoto: Sharing libraries among multiple users

Maybe you are looking for

  • Error while importing logon par file into NWDS.

    Dear Friends , I m trying to customise the logon screen for my project. For this I have downloaded the "com.sap.portal.runtime.logon.par.bak" from portal server instance with the help of basis team. I have locally saved this file on my desktop[. I ha

  • How can I install an old version of the Adobe PDF Reader plug-in/add-on for Internet Explorer?

    I have installed an old version of Adobe Reader (X or 10.1.4), but my Adobe PDF Reader add-on in Internet Explorer remains version 11+...how can I get an old version of this plug-in?

  • Content conversion receiver channel new line at end of file

    hi, when i create a file using content conversion i get new line at the end of the file. can someone tell me please how to avoid this? ( i don't use any end separators. i only use addheaderline = 0 and fieldfixedlength). Thanks Tomer

  • Help - trying to record

    I am a complete Newbie to Mac and GarageBand. I want to take audio from a portable recording device, via an XLR cable from this device to a 1/8-inch jack into the back of my iMac, and record it into GarageBand. However, I can't seem to shut off the b

  • Set value of variable in one bean from another bean

    Using JDeveloper 11.1.1.4, I thought this would be simple to do, but I haven't been able to figure out the correct syntax and am just learning java. In my view controller I have one bean set as pageflow scope, and another bean set as a request scope.