Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2011
    Posts
    20
    Thanks
    5
    Thanked 0 Times in 0 Posts

    I am new, and i want to clarify if my idea can work so easily?

    Hi

    I am new to the more complex coding.

    I have a site, that has a login and sign up form. Its a template and is constructed in a complex manner so it can functions with its cpanel in a manner that is intended.

    Now, i am implementing a third party software package to the original template. It also has login and sign up.

    So i thought to streamline my member experience i could have the main site sign up and login php forms call the third party site sign up and login forms respectively, so then my members dont have to sign up or login twice in any one visit.

    So i'm guessing its as simple as the theory i have, that follows...

    Add a line to the main site php sign up or login code. It would call the third party sign up and login code. It would look similar to this:

    Code:
    include_once('path_to_script/call_this_code.class.php');
    Then for all values in the third party site script that don't match with my main site, for example main site value="username" and third party script value="FirstName" then i will have to go through the third part script and edit, changing all reference to 'FirstName' and change it to 'username'.

    Plus i will need to edit the second database, as each software package uses a separate database. I would need to change the value to reflect the new edits in the third party script, for example no longer 'FirstName' but now 'username'.

    In theory, is it really that easy?

    And please could you tell me if there would be any obvious problems i'm not thinking of?

    thanks
    steve

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Why do you keep posting all of your questions in the MySQL forum? Please take a few minutes when deciding where to post to determine what language is actually the one in question.
    Do not, I repeat, DO NOT ever modify something from within the scope of third party software just to flatten it to work with first party software. The idea is to keep everything in a known fashion, so that modifications including addons and patches can be provided and known to work with the stock software. If you require an interaction between different script work, you provide it with a software bridge. The purpose of the bridge is to map your variables from a different script variables, so that all data can be adapted from any third party to work with first party without the need to modify the actual running code - just the bridge. For an example, a custom developed CMS can interact with a vBulletin user system by providing a bridge between them, mapping all third party variables to a first party representation, as well as methods if desired (via interfaced decorating only). Adapters can also be decorated to allow unlimited depth in control. The idea is that neither the CMS nor the vB will need any modification to interact, as a bridge will stand between them to translate the data back and forth. This is easily accomplished using a controlled abstraction layer for the data access in an OOP fashion. Procedural is actually easier as a variable is directly mapped to another, but seriously lacks in the ability to control it.

    You will need to look into writing custom abstraction for your data access (preferably in an ntier or mvc style approach which is a lot more code but equates to easier bridging), as well as a Bridging / Adapter pattern to translate the data differently. The data then becomes a shared resource between the third party and first party software. These are advanced programming techniques that will require a strong knowledge of the language in use, and a moderate knowledge of the third party software to bridge.

  • Users who have thanked Fou-Lu for this post:

    new_to_this (05-29-2011)

  • #3
    New Coder
    Join Date
    May 2011
    Posts
    20
    Thanks
    5
    Thanked 0 Times in 0 Posts
    thanks thats good

    sc

  • #4
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,440
    Thanks
    62
    Thanked 537 Times in 524 Posts
    So does that mean you will now post php questions in the php forum?
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •