Re: force swf refresh

2006-12-27 Thread Trevor Burton

amfphp calls won't need anything to make them unique - the problem with IE
caching xml is well-known and is due to flash caching external data that it
calls by the file name it calls it with so if you call foo.xml it will
cache 'foo.xml' and if you call it again will load the cached version rather
than make another call to the server. if you call foo.xml?unique=UNIQUE_ID_HERE
then it'll still cache the file but will not locate a file in the cache with
the same name on the next request so will request a fresh file from the
server..

with amfphp you're effectively making calls to php functions on the
server so anything that's returned is returned fresh each time... as an
amf packet - so the result of your call won't be cached. As an Flash
Developer i use both these approaches a lot and simply use a static function
to create a unique file name for xml calls and i've never encountered issues
with cached amfphp calls before.



On 12/27/06, grandpa <[EMAIL PROTECTED]> wrote:



I had SERIOUS problems with IE and a SWF which downloaded data as xml.
I didn't use swfObject but I DID use UFO. I can assure you it didn't
have anything to do with UFO, since I tried to fix this in every way I
could think of. The problem has to do with a setting in IEs prefs...
when caching (something to do with caching, can't remember the pref
name, on my Mac now) is set to "Automatically". This is the default in
Explorer.

Unfortunately, the only way around this problem I found was to append
unique id's to everything. I had to do it to the .swf like so:
"blah.swf?uniqueid="+((new Date).getTime()), to ALL calls to server
scripts that return xml (so this is IN the AS code). I did that in the
same way ( blah.xml.asp?uniqueid="+((new Date).getTime()) ). I didn't
have any control over the server code, so there was nothing I could do
there.

The problem is with IE. Not with anything else. My swf:s, js and html
code worked perfectly before in every other browser EXCEPT IE.

I don't know what advice I could give you regarding amfphp calls...
don't know how to make them unique... but I think that is what you have
to do.

Stupid IE makes caching impossible, which causes more strain on the
server and network.


>



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Legal Concerns Regarding CakePHP and Cake Software Foundation

2006-12-18 Thread Trevor Burton
where does the burden of proof lie in a US patent case?

is it the responsibility of the patent-holder to prove that the defendant is
violating the patent or is is the responsibility of the accused to prove
they aren't.

The argument in this thread seems to suggest that if i hold a patent then i
can go and accuse anyone i like of infringing it and force them to provide
proof that they aren't... as we all know proving a negative can be a
somewhat tricky procedure. This suggests, though, that if i received a
letter from the solicitors of a company who had managed to patent the
for-loop that i'd have to go through the process of proving they hadn't -
which is the responsibility of the people who issue the patents in the first
place

bit of a minefield, really.



On 12/18/06, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
>
> Ok but my point is now more related to the fact that CakePHP founding
> elements are property of the public domain and knowledge.
>
> Let's see, CakePHP follows programming patterns established on the
> developers such as MVC, Active Record, etc. These, IMHO can't be patented.
> Otherwise almost any self-respected framework / product in *any*
> programming
> language would be liable to law suits. So information, as we all know,
> that
> is part of the general knowledge can't be patented, no matter how many
> tries
> you send to the patent office.
>
> CakePHP is a framework that uses established patterns to help developers
> build applications. In reality, there's no innovation there, it is just
> the
> great and smart effort of how to put stuff together to ease up developing.
> So there's no *unique* foundation that can be patented. Therefore, nothing
> can be used later on to harass CakePHP developers.
>
> The case link you sent me is a completely different legal battle: D-LINK
> was
> violating the terms of the GPL linux license, and D-LINK came back arguing
> that the GPL is not a legal binding document (what a pack of bull)
>
> So I don't think there's much to go under these issues. CakePHP foundation
> elements and work can't be patented because they belong to the public
> domain. It will be impossible for someone to patent something as the MVC
> pattern just as it would be impossible for someone to patent the concept
> of
> blogging, for that matter.
>
> -MI
>
>
> ---
>
> Remember, smart coders answer ten questions for every question they ask.
> So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> -Mensaje original-
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de Nimrod A. Abing
> Enviado el: Lunes, 18 de Diciembre de 2006 02:47 a.m.
> Para: cake-php@googlegroups.com
> Asunto: Re: Legal Concerns Regarding CakePHP and Cake Software Foundation
>
> Actually the license is not at issue here. The licenses on most FOSS
> software normally only cover issues regarding ownership and
> distriibution of the code, works derived from the code, and
> modifications to the code. There is no question that software
> licenses, at least to my knowledge the BSD and GPL, *will* stand up in
> court. But only if the concerns in question are what I have enumerated
> above. This has been proven in one court case at least for the GPL.
> See:
>
> http://www.technewsworld.com/story/53212.html - the D-Link case.
>
> The main concern, at least for my employer, is someone or some company
> coming up with a submarine patent on some crucial part of CakePHP and
> then using that patent to harass or sue CakePHP users. The MIT license
> that covers CakePHP code only covers ownership, distribution, derived
> works and distribution of derived works, modifications and
> distribution of modifications, and of course the "NO WARRANTY" clause.
>
> It does not matter if the holder of the submarine patent is *not* a
> contributor to CakePHP who has signed the CSL or CSSL. He just has to
> hold a patent, make a case for its enforcement and then use it to
> harass or sue users. Note that this is not only a concern for CakePHP,
> this also applies to other FOSS projects as well.
>
>
> >
>


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---


Re: SMS with Cake

2006-12-11 Thread Trevor Burton
fantastic, many thanks

On 12/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hi Trevor,
>
> Here is a fairly comprehensive list for accessing various providers:
> http://www.livejournal.com/tools/textmessage.bml?mode=details
>
> I hope this helps?
>
> Thanks,
>
> Ian
>
> On Dec 11, 3:53 am, "Trevor Burton" <[EMAIL PROTECTED]>
> wrote:
> > Is there anything similar for UK SMS services, does anyone know?
> >
> > On 12/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > If you know the provider of the recipients cellphone, you can send an
> > > SMS message easily via a regular email. The format is typically
> > > [EMAIL PROTECTED] Here is a short piece covering this
> > > technique:
> > >http://lifehacker.com/software/cell-phones/send-sms-from-email-127033.
> ..
> >
> > > Thanks,
> >
> > > Ian - Chicago, IL
> >
> > > On Dec 8, 3:46 pm, "Sonic Baker" <[EMAIL PROTECTED]> wrote:
> > > > Just wondering if anyone has come across the need to send SMS
> messages
> > > with
> > > > a cakePHP application before?
> >
> > > > I presume this is done in a controller and then saved to the model
> along
> > > > with the return code from the SMS provider. Just wondering what
> methods
> > > > people have used, ie:
> >
> > > > Send the message in the beforeSave() method of the Model
> > > > or
> > > > Use a component to take care of the sending
> > > > or
> > > > Just send and save
> >
> > > > What would you recommend and why?
> >
> > > > Cheers,
> >
> > > > Sonic
>
>
> >
>


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---


Re: SMS with Cake

2006-12-11 Thread Trevor Burton
thanks for that - i see something on the horizon so wanted to sound
knowledgeable when asked... cheers

On 12/11/06, ski.nalicio.us <[EMAIL PROTECTED]> wrote:
>
>
> I have been involved in building an application that is part of the
> m-learning framework here in the UK.  Part of this makes use of SMS; we
> actually used Esendex as the service provider (SMS gateway service
> provider).
>
> www.esendex.com
>
> They offer a SOAP API (requires PHP5) and also allow you to send and
> recieve via POST.  It is actually quite simple to implement.
>
> https://www.esendex.com/support/sms-api-http-form-post.aspx
>
> ski.nalicio.us
>
>
> >
>


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---


Re: SMS with Cake

2006-12-11 Thread Trevor Burton
Is there anything similar for UK SMS services, does anyone know?

On 12/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> If you know the provider of the recipients cellphone, you can send an
> SMS message easily via a regular email. The format is typically
> [EMAIL PROTECTED] Here is a short piece covering this
> technique:
> http://lifehacker.com/software/cell-phones/send-sms-from-email-127033.php
>
> Thanks,
>
> Ian - Chicago, IL
>
> On Dec 8, 3:46 pm, "Sonic Baker" <[EMAIL PROTECTED]> wrote:
> > Just wondering if anyone has come across the need to send SMS messages
> with
> > a cakePHP application before?
> >
> > I presume this is done in a controller and then saved to the model along
> > with the return code from the SMS provider. Just wondering what methods
> > people have used, ie:
> >
> > Send the message in the beforeSave() method of the Model
> > or
> > Use a component to take care of the sending
> > or
> > Just send and save
> >
> > What would you recommend and why?
> >
> > Cheers,
> >
> > Sonic
>
>
> >
>


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---


Re: HABTM select problem

2006-10-28 Thread Trevor Burton
SQL Error in model Subscription: 1054: Unknown column 'user_id' in 'where 
clause'

i'm sure this is built correctly - but i'm not getting the results so maybe it isn't

subscription model

class Subscription extends AppModel
{
    var $name = 'Subscription';
    var $hasAndBelongsToMany = array('User','Product');

}

user model

class User extends AppModel
{
    var $name = 'User';
    var $hasAndBelongsToMany = array('Subscription');
    var $hasOne = array('Profile');

 etc.etc.etc.

}

so i don't see what i'm missing? any suggestions for what i should be checking?

TOn 10/28/06, Ismael S. Kafeltz <[EMAIL PROTECTED]> wrote:
This shouldn't be something like this:$data = "" = $id AND subscription_id =blablabla");if HABTM is corrected built, it will return all subscription from userid

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


HABTM select problem

2006-10-28 Thread Trevor Burton
This probably comes under the 'newbie' category but i can't work out why this is happening and i have searched the groups...

I have two models - Users and Subscriptions - each with HABTM relationships with each other...

I want to collect all the Subscriptions for a particular User

this is my query:

$data = "">

and this is what the sql statement looks like:

SELECT `Subscription`.`id`, `Subscription`.`period`, `Subscription`.`name` FROM 
`subscriptions` AS `Subscription` JOIN `subscriptions_users` ON 
`subscriptions_users`.`user_id` = '113' AND 
`subscriptions_users`.`subscription_id` = `Subscription`.`id` WHERE 1 = 1

the problem is that it's restricting records to those that match the
[`subscriptions_users`.`subscription_id` = `Subscription`.`id`] section
which i don't need. The query will work fine if i take this out... but
why is it there in the first place... and how can i get rid of this?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: HELP:how to nest the media to the page

2006-10-27 Thread Trevor Burton
customise the Media Components that come with flash and create some flash video (flv) files you can create playlists and stuff and load the videos dynamically - if you use SWFObject to embed flash in your page you can easily grab a variable from the query string and use that to trigger a video or use LocalConnection to have another swf in the page trigger a video to load. 
There are literally 100s of tutorials around the web for doing this sort of thing... google is your friendTOn 10/27/06, 
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
They're embedding the videos into flash to do that. I don't know theimplimentation details, never having done any flash development, butthat's the basics.On Oct 27, 9:00 am, "
[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:> I have some confuse how does the media played in the web page like> YouTube.com> Who can tell me how does it implement?
> Need to use any script?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: This Mailing List Isn't on Google For No Reason

2006-10-24 Thread Trevor Burton
as a distinctly average php user and a newcomer to cake i'll add my thoughts here for what it's worth.

The fact that Cake is (or can be) such a powerful framework is a
double-edged sword - serious developers use it to solve common problems
quickly and speed up development of complex apps 

but 'newbies' are probably seeing the hype and thinking it's a
short-cut to actually putting in the time to learn PHP - it's getting
seen as quicker to learn Cake then to actually understand the
fundamentals of creating a database connection or knowing the ins and
outs of the MVC model.

IMO that's why there are so many 'newbie' php questions and a lack of
searching for questions that have been asked again and again. 

I think most people who post these 'simple' question have searched but
just maybe done searches for a couple of simple keywords and phrases,
haven't found the answer they want in the first two or three results of
each search so they post a question.

If a set of FAQs is relevant, evolves with the community and is kept
updated then it's never a waste of time. I'd strongly suggest that it
includes sample code cause otherwise there'll be a load of posts on the
group that begin 'i saw this in the faq but how do i actually use it in
my app?' 

just my 2p... but it seems like something needs to be done to prevent
the problem that's been identified from getting out of hand and
swamping the group on google.

TOn 10/24/06, Mikee Freedom <[EMAIL PROTECTED]> wrote:
morning all,just thought i would chime in with my 2.i agree, there are a lot of beginners about the place.at one stage being a Cake newbie myself, it has only been throughserious time dedicated have I managed to come out with what I think to
be a pretty good application utilising *some* of the finer points ofCakePHP.along the way there were a lot of occasions where I didn't know whichdirection to choose and found myself procrastinating about a decision
due to a simple lack of knowledge about either MVC or Cake itself.I have found great assistance in:1. the manual2. the wiki (and now the bakery)3. the various blogs around (thanks fellas)4. searching google groups
5. the source code6. the api7. asking questions in hereroughly in that order.i think either a faq, or a seperate category in the bakery for 'TheBasics' would be very beneficial.In a nutshell, i've managed to find my way around using the current
resources. however an area where these basic questions were answeredwould be wonderful. every time a question continues to arise in thegroups it would be nice to record it somewhere else in a tagged (andpossibly categorised) trouble shooting or faq section.
doesn't have to be one of the fellas who adds it, i'm sure any of uscan summarise the email thread and include the content in the rightplace.just some thoughts,mikeeOn 25/10/06, kiper <
[EMAIL PROTECTED]> wrote:>> > Praise the powers that be, the wiki is dead. I suppose I could start> > a page on the manual that only features FAQs. Anyone want to help on
> > that?>> I'll gladly help you with that, John, if you're interested! Still feel> like a blueberry but I've been around since July :)>> I think that the manual and the api are ample information for the
> beginner and the Bakery is shaping up nicely.>> Maybe the problem is, as Nate says, that there are too many beginners> that haven't got a clue about programming, PHP or MySQL. So, a FAQ that
> points them in the right direction and gives them examples of what the> Cake Foundation think is "good" coding if you're going to work with> CakePHP, seems like a very good idea.>>
> >>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Fwd: Check out the one that suits ur degree!!!

2006-10-24 Thread Trevor Burton
Cunt cunt cunt - you are a cuntOn 10/24/06, Jitender Kumar Nauni <[EMAIL PROTECTED]> wrote:
  
Hi frnds,         Here is one site of substance, related to careers. Any one can check the relevancy of his/her skill along with the information given in the site. Also one can check out the various sponserd links given by the different organistaion. Also forward it to all your friends for whom it may or may not be 
relevant.Let it Reach out to all in need of job.  http://www.download-career.blogspot.com/
  Tanku,     Nauni JK   Do you Yahoo!?Get on board. 
You're invited to try the new Yahoo! Mail.  How low will we go? Check out Yahoo! Messenger's low 
PC-to-Phone call rates. 
		Why keep checking for Mail? The all-new Yahoo! Mail
 shows you when there are new messages.




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Undefined Method stdClass::read()

2006-10-22 Thread Trevor Burton
Spot on, my fault - Product was missing it's association with Category

Thanks!

TOn 10/22/06, AD7six <[EMAIL PROTECTED]> wrote:
Hi Trevor,If you did $this->Product->IMadeThisUp->read(); you would get the sameerror message.You need to either include Category in the association definition forProduct, or you have defined Category such that it doesn´t extend
AppModel (or AppModel is defined but doesn´t extend Model).HTH,AD7six

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Accessing variable in child class from app_controller's beforeFilter

2006-10-17 Thread Trevor Burton
if the UserController extends AppController then (essentially) when you create an instance of the UserController class it contains all the members of the AppController Class as well as what's defined in UserController. They're created effectively as a single object.
So, by putting something in UserController - you're giving it access to AppController's stuff, too.So something in UserController will be able to access AppController - and then it will be able to get stuff from UserController. But you won't be able to put something in AppController which asks for something that UserController owns and then expect an instance of AppController to be able to get it to work.
If you have an Animal Class and your Dog Class extends Animal then your dog will have all the functionality of an Animal - but your Animal Class won't necessarily know how to bark!Does that make sense!?
On 10/17/06, brandags <[EMAIL PROTECTED]> wrote:
Alright. That makes sense.But since the Users controller extends the App controller, if I go to apage like:/users/addShouldn't that be creating a User object rather than an App object? Sothat when the beforeFilter runs, it's running through the User object?
For example, if I put the beforeFilter in the userController, itunderstands it. And I can call a function in the App controller whichcan THEN reference variables in the User controller just fine. But itseems that the beforeFilter runs BEFORE the User controller is created,
as if the App controller runs on its own before it's run as an"extension" of the Users controller. Am I making sense?When does the beforeFilter run when calling /users/add? And if I have abeforeFilter in both my Users and App controllers, in what order are
they run?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: *MPG-CAP* new product for saving of Gasoline and Diesel fuel from USA

2006-10-16 Thread Trevor Burton
cuntOn 10/16/06, Mr. Chan <[EMAIL PROTECTED]> wrote:
This is a new business chance from USA, Many drivers used MPG-CAP tosave more than 20% of gasoline and Diesel fuel in USA and Canada, youcan see the websites here:
http://biz.yahoo.com/prnews/060614/dcw024.html?.v=62http://www.fueltodream.com/WSAZ_2_sm.wmv
http://www.todaystmj4.com/VideoPlayer/video.aspx?fs=081706_10pm_GasPillSavingsThis is the company's website for introduction of this product:http://www.fat.myffi.biz/en/section_100.asp
Over 1000 people involved in this business within 1 month in Taiwan inthe first quarter of 2006, it will be successful in other Asia regions.GREAT BUSINESS CHANCE will happen once ten years!!!
If any inquiries, pls e-mail to [EMAIL PROTECTED]

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: About Cake's MVC model

2006-10-06 Thread Trevor Burton
Views can directly access a model - you could, for instance reference a
static member from a model in the view (perhaps to set a key for a
button click event) - the controller could also access this static
variable and act accordingly - this is not neccesarily an inherently
*very* bad thing. I'm working on an online multiplayer game at the
moment that works very nicely using this methodology throughout the app
- which is constructed of dozens of MVCs.

Having a single point of reference for a key means that you only need
to change that key once and everything still knows what it means... it
also means you don't really need to change the key - as long as it
differs from other keys.

MVC is becoming a looser and looser term of reference - saying
something is or is not MVC is not really that important - not as
important as having something that works well and is easily
extended/adapted. If it has a Model, a View and a Controller then it
can be called MVC - but as Marcelo rightly points out it might not
necessarily adhere strictly to the GoF MVC.On 10/6/06, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> wrote:
Nate,
 
>Views should never have>direct access to models, nor should models have direct access to views.>Any direct interaction between the two is a major violation of the>separation of your tiers.


 
They don't. There's indeed a view reference on the controller
class, but the model and the view communicate through the observer
pattern: when the model gets updated, it broadcasts an event
(notifyObservers), the viewer's then get notified about the change and
can do whatever they want with the new data. There's not direct
reference between them.

 
But as I said, there are many different MVC implementations and
not all adhere strictly to the GoF blueprint and I don't think that
just becouse of that they are not MVC. 
 
 
On 10/6/06, nate <[EMAIL PROTECTED]> wrote:

> Views broadcast events to the Controller. The Controller does the associated> action, which in turn can directly access the view via a reference or update
> the Model. The Model gets updated and then broadcast onChange event to all> the Views that registered as listeners.Then it must not be MVC, because if you're talking about MVCseparation, that's a very, *very* bad thing.  Views should never have
direct access to models, nor should models have direct access to views.Any direct interaction between the two is a major violation of theseparation of your tiers.




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: About Cake's MVC model

2006-10-06 Thread Trevor Burton
Think about it like this:Imagine a clock - the ClockModel would contain information about the current timeyou could have 2 seperate views - Analog and Digital in order for them both to received updates (each 'tick' of the clock) from the model they would 'register' with the model
the model would hold a list of all it's observers and when a notifyObservers() method is called on the model it would send an update to all the views in it's list telling them about it's current state.a view might also contain user interface controls (for instance, to start and stop the clock) - button might dispatch an event to the controller which checks with the model to see whether the clock is running or not, if it's running, it stops the clock - if it's stopped it starts the clock. the model changes state and broadcasts an update to it's views etc etc. etc.
this is how it works in Actionscript - which i'm familiar with - and in this situation you would certainly want a model to notify a view about things - you might also want the controller to tell the view about things rather than bother the model with it unnecessarily.
On 10/6/06, Chris Hartjes <[EMAIL PROTECTED]> wrote:
On 10/6/06, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> wrote:> From what I can see, the main purpose of Cake's MVC is to separate things,> but you can't for example register Views on a model and the model doesn't
> automatically notifies the Views.>I don't understand what you mean by "you can't for example registerViews on a model."  Why would you want a view to modify your model?That violates all sorts of rules about coupling code and defeats the
whole purpose of MVC in my opinion.A Model returns you data in a format you needA controller gets data from a model and passes it to a viewA view displays the data that's been passed to it."Registering" is a concept I have not heard of and would like an
explanation as to better understand it.   Why would you want a modelto notify a view about something?  Obviously, there is some concepthere I'm not aware of.--Chris Hartjes"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf@TheBallpark - http://www.littlehart.net/attheballpark@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Can a model have a relationship with itself?

2006-10-06 Thread Trevor Burton
many, thanks, i'll not be so lazy and do a more thorough search next time ;)thanksOn 10/6/06, AD7six <
[EMAIL PROTECTED]> wrote:I meant extends AppModel of course..

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---