Professional Web Applications Themes

Design problem - PHP Development

Hi All, This could be a classic design problem, but as I am using PHP, I thought I would seek help in this NG. I have built a small application in PHP/MySQL which can store some product information in a database and at a later stage, one can search and generate the stored data in XML format, to be uploaded to a remote server.Each product has a set of features.Now the problem is that the features of any of the products change too often according to the market conditions etc.Modifying any feature requires me to make changes in GUI, the ...

  1. #1

    Default Design problem

    Hi All,
    This could be a classic design problem, but as I am using PHP, I
    thought I would seek help in this NG.
    I have built a small application in PHP/MySQL which can store
    some product information in a database and at a later stage, one can
    search and generate the stored data in XML format, to be uploaded to a
    remote server.Each product has a set of features.Now the problem is
    that the features of any of the products change too often according to
    the market conditions etc.Modifying any feature requires me to make
    changes in GUI, the SQL queries in the store/generate pages, in the
    database and also in the XSL used to display the generated XML.All
    this has become too bersome and I am thinking of rewriting the
    whole thing in a more logical way.
    I was thinking of representing a Product with a class, each feature
    being its fields and corresponding get/set methods. But Im not sure
    whether even this would help me in avoiding changing SQL queries/XSL
    etc. for each changes in the class fields.
    I would appreciate any information in this regard.

    Thanks

    Inder
    Inder Guest

  2. #2

    Default Re: Design problem

    "Inder" <inder1978hotmail.com> wrote in message
    news:e79bfa2c.0309170124.19dacc70posting.google.c om...
    > Hi All,
    > I have built a small application in PHP/MySQL which can store
    > some product information in a database and at a later stage, one can
    > search and generate the stored data in XML format, to be uploaded to a
    > remote server.Each product has a set of features.Now the problem is
    > that the features of any of the products change too often according to
    > the market conditions etc.Modifying any feature requires me to make
    > changes in GUI, the SQL queries in the store/generate pages, in the
    > database and also in the XSL used to display the generated XML.All
    > this has become too bersome and I am thinking of rewriting the
    > whole thing in a more logical way.
    maybe you could your product contain a set of features, where each feature
    is represented with object (and row in features table). You would have a few
    types of features, (number, text, image, longer text).

    rush
    --
    [url]http://www.templatetamer.com/[/url]



    rush Guest

  3. #3

    Default Re: Design problem

    On Wed, 17 Sep 2003 02:24:10 -0700, Inder wrote:
    > Hi All,
    > This could be a classic design problem, but as I am using PHP, I
    > thought I would seek help in this NG.
    > I have built a small application in PHP/MySQL which can store
    > some product information in a database and at a later stage, one can
    > search and generate the stored data in XML format, to be uploaded to a
    > remote server.Each product has a set of features.Now the problem is that
    > the features of any of the products change too often according to the
    > market conditions etc.Modifying any feature requires me to make changes in
    > GUI, the SQL queries in the store/generate pages, in the database and also
    > in the XSL used to display the generated XML.All this has become too
    > bersome and I am thinking of rewriting the whole thing in a more
    > logical way.
    > I was thinking of representing a Product with a class, each feature
    > being its fields and corresponding get/set methods. But Im not sure
    > whether even this would help me in avoiding changing SQL queries/XSL etc.
    > for each changes in the class fields.
    > I would appreciate any information in this regard.
    >
    > Thanks
    >
    > Inder

    Haven't used it myself yet, but have been told it's something very
    practical: PEAR DB_DataObject ([url]http://pear.php.net[/url])
    (you build your database-class-objects, and the pear-thing builds the sql
    for you.)

    grtz, sotto
    sotto Guest

  4. #4

    Default Design Problem

    Hi, I'm a programmer, but new to ASP.NET. I'm playing around with the
    Repeater and DataGrid controls. Here's the situation. I've got a MySQL
    database containing a couple tables. One called "games", one called "picks".
    picks has fields "GameID", and "PickedTeam". games has fields "GameID",
    "HomeTeam", and "AwayTeam". I what to be able to display all the data in the
    games database in a table on a webpage with the user being able to select who
    he or she thinks will win that game. I want to use radio buttons so the user
    can only choose one team per row. Then when the user has choosen a winner for
    each game (or row) he or she clicks the "Sumbit" button. What needs to happen
    now is that for each row, an entry is entered into the picks table. The
    GameID and PickedTeam are entered. I'm not going to worry about any of the
    validation yet until I have this working. The idea I have in my head is to
    have a RadioButtonList for each row. The ID will be the GameID field pulled
    from the database. Each RadioButton in the list's name will just be the name
    of the team pulled from the database. Then when one team is choosen from each
    row, what can be entered in the picks database is a bunch of rows based on
    the name of the RadioButtonList and the value choosen in that List. This is
    probably not a difficult problem for someone who really knows the controls
    well and knows how to use them. Any feedback is really appreciated. Thanks!

    JRB Guest

  5. #5

    Default Re: Design Problem

    Here, give this a read for your RadioButtonList TemplateColumns:

    [url]http://aspnet.4guysfromrolla.com/articles/061002-1.aspx[/url]

    Then, in the Click event of your submit button, you can iterate through your
    DataGrid's Items collection. Each item (row) has a Cells collection, and each of
    those in turn has a Controls collection.

    Find out the index of your RadioButtonList in that Controls collection, and the
    rest should be easy.

    ' Careful, not tested -- written from memory only
    For Each loItem As DataGridItem In grdDataGrid.Items
    For Each loCell As TableCell In loItem
    For liIndex As Integer = 0 To loCell.Controls.Count - 1
    If TypeOf loCell.Controls(liIndex) Is RadioButtonList Then
    Response.Write(liIndex)
    End For
    End For
    End For

    HTH,
    Jeff



    JRB wrote:
    > Hi, I'm a programmer, but new to ASP.NET. I'm playing around with the
    > Repeater and DataGrid controls. Here's the situation. I've got a MySQL
    > database containing a couple tables. One called "games", one called "picks".
    > picks has fields "GameID", and "PickedTeam". games has fields "GameID",
    > "HomeTeam", and "AwayTeam". I what to be able to display all the data in the
    > games database in a table on a webpage with the user being able to select who
    > he or she thinks will win that game. I want to use radio buttons so the user
    > can only choose one team per row. Then when the user has choosen a winner for
    > each game (or row) he or she clicks the "Sumbit" button. What needs to happen
    > now is that for each row, an entry is entered into the picks table. The
    > GameID and PickedTeam are entered. I'm not going to worry about any of the
    > validation yet until I have this working. The idea I have in my head is to
    > have a RadioButtonList for each row. The ID will be the GameID field pulled
    > from the database. Each RadioButton in the list's name will just be the name
    > of the team pulled from the database. Then when one team is choosen from each
    > row, what can be entered in the picks database is a bunch of rows based on
    > the name of the RadioButtonList and the value choosen in that List. This is
    > probably not a difficult problem for someone who really knows the controls
    > well and knows how to use them. Any feedback is really appreciated. Thanks!

    Jeff Bowman Guest

Similar Threads

  1. db query/design problem
    By kabbi~thkek in forum Coldfusion Database Access
    Replies: 0
    Last Post: September 30th, 11:50 AM
  2. Design view problem
    By Mango in forum ASP.NET Building Controls
    Replies: 1
    Last Post: March 11th, 09:11 AM
  3. Design Problem!!
    By Jay in forum ASP.NET Web Services
    Replies: 3
    Last Post: May 27th, 07:01 AM
  4. Design-time problem
    By stefano mostarda in forum ASP.NET Building Controls
    Replies: 1
    Last Post: November 27th, 06:07 PM
  5. Database Design Problem
    By Aaron in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: July 8th, 12:36 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139