| 
	
 | 
 Posted by Jerry Stuckle on 08/08/06 23:43 
nephish wrote: 
> Jerry Stuckle wrote: 
>  
>>nephish wrote: 
>> 
>>>Ok, well what i have been doing is creating session variables for 
>>>everything possible that relates to what one may call an object (not in 
>>>the code, but at the site) 
>>>like $name = $_SESSION['name']; 
>>>$email = $_SESSION['email']; 
>>>$phone = yadda, yadda, yadda 
>>> 
>>>so, i suppose this is still the easier way to pull this off. 
>>>thanks for all the info, i am trying to learn as much as possible 
>>>because i want to redesign everything in the fall. i started learning 
>>>php about a year ago, and a whole lot of stuff i did last Fall, i would 
>>>do differently this Fall. 
>>>So i want to make it as streamlined as possible. 
>>> 
>>>thanks for all your help 
>>> 
>>>shawn 
>>> 
>>> 
>> 
>>How I typically do it (since I have my data in a database) is to store 
>>the primary key to the entry in my $_SESSION object.  Then I fetch 
>>whatever I need from the database when I need it. 
>> 
>>I find this to be much cleaner code.  It also fetches current 
>>information in the (admittedly unlikely) event the data is changed while 
>>you're passing it around. 
>> 
>>P.S. Please don't top post.  This newsgroup uses bottom (or inline) 
>>posting as the standard. 
>> 
>>-- 
>>================== 
>>Remove the "x" from my email address 
>>Jerry Stuckle 
>>JDS Computer Training Corp. 
>>jstucklex@attglobal.net 
>>================== 
>  
>  
> by bottom post, you mean write my stuff at the bottom of the text entry 
> box ? 
> like this ? Sorry about that. I have kinda wondered which is better. 
> 
 
Yep, or intermingled, like this.  Thanks. 
 
 
> Anyway. I like that idea too. just storing the session variable of the 
> primary key. 
> in my case (user_id_number), and just using that to conquer everything 
> else. 
>  
> OK, i have another question about this re-write i want to do. Please 
> understand, i started learning php about 10 months ago by building our 
> huge website with it. couple of hundered scripts now. 
>  
> there is a lot i find on the web about MVC. But also found that it 
> seems to be best for simple CRUD. What we have here is a lot more 
> complex. We are pulling machine data, processing it, displaying graphs 
> of machine effeciency, history of machine performance, etc.. Once 
> things get complex like that, not like a blog site or something, does 
> an MVC still make sense ?  
>  
> thanks.  
>  
> sk 
>  
 
Probably, but I don't use packages.  I typically define my own class  
hierarchy.  With a little practice and some templates I created, it  
doesn't take me long. 
 
One set of classes to interface to the database, then one on top of that  
for the business logic. 
 
 
--  
================== 
Remove the "x" from my email address 
Jerry Stuckle 
JDS Computer Training Corp. 
jstucklex@attglobal.net 
==================
 
  
Navigation:
[Reply to this message] 
 |