U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ MT-multithreading and servers » Skylark OO (reposted from PM)
Re: Skylark OO (reposted from PM) [message #39718 is a reply to message #39717] Sat, 20 April 2013 14:52 Go to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
mirek wrote on Sat, 20 April 2013 08:37

Hello Mirek,

Do you have any plans to make Skylark object orientated? And maybe using MVC?
If you know CakePHP, object orientated in that direction, using components, elements, helpers, etc.

I've tried something in that direction, but i've hit procedural design of skylark.

#define SKYLARK_C(klass, method, path)\
INITBLOCK {\
	klass obj;\
	UPP::RegisterHandler(callback(&obj, &klass::method), #klass"_"#method, path);\
}

SKYLARK_C(Test, test, "")
SKYLARK_C(Test, user, "user")




Have you checked chapter 12 of skylark tutorial? That is as far as I got...

One note from my perspective w.r.t. OO with web applications: You have to consider that the application can be running "distributed" over many server nodes, which means that using memory for the storage of object data is impossible (in general case). So it is unlikely that you could directly use C++ objects and somehow make them work in web..

Quote:


Also there are problems when javascript code is inlined in template. I.e.:
<script type="text/javascript">
$("#test").button();
</script>

get converted to
<script type="text/javascript">
#test.button();
</script>

Should i escape it somehow?

Best regards,
Andrei


"$$"

Mirek
 
Read Message
Read Message
Previous Topic: Is there a Threadpool in U++?
Next Topic: Skylark and GUI in one app - need some advices
Goto Forum:
  


Current Time: Thu Sep 10 18:04:34 GMT+2 2026

Total time taken to generate the page: 0.01326 seconds