Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Multiple versions of a component...possible ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Multiple versions of a component...possible ?

    I am loving Alpha Five but there is one challenge I have always wondered how to get around:

    I have a large comprehensive web app developed in Alpha Five.

    More than often, there will be a customer of mine who requires just one or two components to be 'customized' to suit their needs.
    Ideally, this is what I would like :

    (a) to keep all the components together in the same workspace(Alpha database)

    (b) all variations of a component having the same name as the original component. I don't want to duplicate the component and then give it a different name - too much logic
    will have to be added to factor in all the different versions out there. Plus each time a customer is added I have to add another "IF" statement.
    This is where I was hoping that I could create a project within the same workspace(Alpha database) for each customer
    to store only the 'customized components'. The 'customized components' would have the same name as the original ones in the base project.
    Whenever these 'customized components' are published they would overwrite the original component in the published folder.

    The problem now is that while I am in design mode, a component cannot 'see' or 'access' other components in another project although they might be in the same workspace (database).

    So, what I have to do currently is to create a different copy of my entire web app for each customer. As you can imagine this is grief.
    Has anyone else faced this challenge ? Are there any ideas of how I can get around this ?

    Thanks in advance.

    #2
    Re: Multiple versions of a component...possible ?

    Hi Robert,

    I don't know what other might think or suggest, but without knowing why you have designed your site the way you have, it sounds like you have built in the grief you mentioned.

    Why is it not possible to get your users to be registered to use the site? Then you can make the components do what you want according to the type of user.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: Multiple versions of a component...possible ?

      Robert,

      Interesting idea! I'd put it in http://alphasoftware.ideascale.com/

      Cheers,
      Frank
      Frank

      Tell me and I'll forget; show me and I may remember; involve me and I'll understand

      Comment


        #4
        Re: Multiple versions of a component...possible ?

        You don't need to have separate components.

        Depending on the differences you need, you can usually achieve them by adjustments in some of the client side events, or use containers to hide or show things depending on customer credentials.

        I have an app like this where different customers have a few of their own preferences or features. A Features_Table with a feature ID and customer ID to help identify the things is handy, then refer to it when deciding what to present at runtime.
        -Steve
        sigpic

        Comment


          #5
          Re: Multiple versions of a component...possible ?

          I appreciate the responses.

          Keith, you are partially correct.... and to respond to the other excellent suggestions : I am quite comfortable implementing settings/feature tables and using complex workflow logic, etc, which I have already done. I was hoping that everyone would have taken my request at face value and ignore the reasoning behind it :) (which is hard to do BTW).
          I now need to explain the situation.

          I guess all this started when I got greedy in trying to facilitate potential customers who are showing great interest but who really fall outside the original intended target customers.
          If you know what I mean. So yes, my app already has alot of ready-made customization...(I should have mentioned this originally)

          So I am still seeking an easy way to implement a way of doing 'overrides' at the file level.
          I am sure those familiar with (a) Zope/Plone or (b) library lists on the AS/400 would appreciate what I am talking about .

          Thanks again

          Comment


            #6
            Re: Multiple versions of a component...possible ?

            IF when the user logs in, they have a ulink.
            If this ulink is mapped back to a company.
            If the company table has a company type.

            You can then add conditional logic on pages to output different grid objects based on company type.
            Yes your grids would have to be duplicated a nd yes if you make a bug fix you have to apply it to all grids.

            But maybe some bugs are specific to company type 'CLIENT' while others are specific to company type 'CONTRACTOR'.

            Customization means different grids, conditional statements, conditional logic. Theres no easy way around it.
            What your asking for is for conditional logic.

            Based on X - swap in component Y.

            Code:
            <%a5
              if session.__protected__company_type=='CLIENT' then
                   grid_filename='mygrid'
             else if session.__protected__company_type=='CONTRACTOR' then
                   grid_filename='contractorgrid'
             end if
            
              'The componentAlias MUST be UNIQUE for each component on the page. It must not have spaces in the name. Keep name as short as possible
            dim componentAlias as c 
            componentAlias = "GRID_ENGINEER_T"
            Delete tmpl_GRID_ENGINEER_T
            DIM tmpl_GRID_ENGINEER_T as P
            tmpl_GRID_ENGINEER_T = a5w_load_component(grid_filename) 
            tmpl_GRID_ENGINEER_T.override_settings = "componentName = componentAlias _gridFilename = \""+grid_filename+"\"";
            
            'TIP: To refer to local or page variables in the override_settings string, you must first define a local
            'dot variable called 'pageVar' with properties for all of the variables you want to reference. For example:
            '	dim pageVar as p
            '	pageVar.gridRowCount = 10
            'Then, in the override_settings string, you can reference pageVar.gridRowCount. For example:
            '	rows = pageVar.gridRowCount
            'Resolve session and page variables in the override_settings string.
            a5w_resolveVariablesInOverrideSettings(tmpl_GRID_ENGINEER_T,session,local_variables())
            delete x_GRID_ENGINEER_T
            dim x_GRID_ENGINEER_T as p
            x_GRID_ENGINEER_T = a5w_run_Component(tmpl_GRID_ENGINEER_T) 
            if x_GRID_ENGINEER_T.RedirectURL <> "" then 
            	response.redirect(x_GRID_ENGINEER_T.redirectURL)
            	end
            end if 
            ?x_GRID_ENGINEER_T.Output.Head.JavaScript
            ?x_GRID_ENGINEER_T.Output.Head.CSS_Link
            %>
            Something like that might work. But really thats just dynamic switching of a grid on a page.
            You can just do seperate grids / pages and redirect based on company type or security groups or however else you please.

            Goodluck
            Scott Moniz - Computer Programmer/Analyst
            REA Inc.
            http://reainc.net
            (416)-533-3777
            [email protected]

            REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
            If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
            contact us to discuss options.

            Comment


              #7
              Re: Multiple versions of a component...possible ?

              I think I understand what you want, but I could be off.

              Steve Wood just helped me out by pointing out his work here:

              Video: http://www.screencast.com/t/tbnh4Amth
              blog: http://alphatogo.blogspot.com/2011/0...-value-in.html

              For my purposes I found the second one helpful, but feel the first one may be what your looking for.

              Comment

              Working...
              X