[PHP] A bad design decision or pure genius?

2011-01-13 Thread li...@pruimphotography.com

Hey Everyone,

I have a question about php & javascript... Yes I know this forum is  
for php BUT I needed an opinion on where to look for stuff...


I have a application that I'm working on that uses google maps to  
display interactive maps (using javascript) on the website. I now have  
the need to display multiple maps on the same page and from what I can  
tell I have to create new instances and variables for all of them...


What I'm wondering is since I know very little javascript would it be  
bad to create a PHP function to write the java code for the proper  
number of maps I need to display? The map info is being pulled from a  
database where events are being added and could contain 2 or 200 maps...


Or should I learn javascript and figure out how to create a loop in  
there so that I can just loop it in the java and not repeat code?


Thanks for any assistance you can give!

Jason Pruim
pru...@gmail.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A bad design decision or pure genius?

2011-01-13 Thread li...@pruimphotography.com


On Jan 13, 2011, at 7:54 PM, Joshua Kehn wrote:


On Jan 13, 2011, at 7:49 PM, li...@pruimphotography.com wrote:


Hey Everyone,

I have a question about php & javascript... Yes I know this forum  
is for php BUT I needed an opinion on where to look for stuff...


I have a application that I'm working on that uses google maps to  
display interactive maps (using javascript) on the website. I now  
have the need to display multiple maps on the same page and from  
what I can tell I have to create new instances and variables for  
all of them...


What I'm wondering is since I know very little javascript would it  
be bad to create a PHP function to write the java code for the  
proper number of maps I need to display? The map info is being  
pulled from a database where events are being added and could  
contain 2 or 200 maps...


Or should I learn javascript and figure out how to create a loop in  
there so that I can just loop it in the java and not repeat code?


Thanks for any assistance you can give!

Jason Pruim
pru...@gmail.com




Love the lists@ email address there.

My preference would be to invest some time in frontend (JavaScript)  
skills, as that would be the most "proper" way to implement it. If  
you don't have the time, might as well use whatever tools you are  
most comfortable with. Could turn into a bit of a mess though.


Hey Josh,

Yeah the lists@ address just makes it easier since I am syncing email  
with my smart phone I didn't want to get all of this list plus the  
many others I'm on to get synced... I doubt my phone could handle it  
hehehe.


In the long run I want to learn javascript... But this new requirement  
just popped up on me on a project that I was working on... So I was  
gauging what was going to be easier :)


Thanks for the response!



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A bad design decision or pure genius?

2011-01-13 Thread li...@pruimphotography.com


On Jan 13, 2011, at 8:53 PM, Daevid Vincent wrote:


-Original Message-
From: li...@pruimphotography.com [mailto:li...@pruimphotography.com]
Sent: Thursday, January 13, 2011 4:50 PM
To: php-general@lists.php.net
Subject: [PHP] A bad design decision or pure genius?

Hey Everyone,

I have a question about php & javascript... Yes I know this forum is
for php BUT I needed an opinion on where to look for stuff...

I have a application that I'm working on that uses google maps to
display interactive maps (using javascript) on the website. I
now have
the need to display multiple maps on the same page and from
what I can
tell I have to create new instances and variables for all of them...

What I'm wondering is since I know very little javascript
would it be
bad to create a PHP function to write the java code for the proper
number of maps I need to display? The map info is being
pulled from a
database where events are being added and could contain 2 or
200 maps...

Or should I learn javascript and figure out how to create a loop in
there so that I can just loop it in the java and not repeat code?

Thanks for any assistance you can give!

Jason Pruim
pru...@gmail.com


Not sure why you would need to show more than a single map at any  
given
time. Therefore why not use PHP to show a list of possible maps and  
when

the user clicks on one, use AJAX to populate a single map on demand?


Hey Daevid,

That is a great idea... The only issue is i don't know ajax yet :)

But it's on my list of things to do this year!

What I ended up doing is just putting a static image in which is  
generated automatically by google on the fly using the GPS coordinates  
that I supply, it places a marker on the image, and then it links into  
a full map where you can pan, zoom, get directions etc. etc.


So just needed to think out side the box a little bit!

And... For the archives... YES that would have been a bad design  
decision. It was a crutch to get me through until I can learn more  
javascript and start mastering that.


Thanks for the help! :)




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Design question

2011-02-05 Thread li...@pruimphotography.com

Morning everyone!

I have a design question... No it's not about the interior of my  
house... although I could use some help with that as well...


I am working on a framework for my own use (And maybe one day will  
beat out the popular frameworks! Hey I can dream right? :)) and to  
increase my knowledge.


Here's my current index page:

DJ_doctype("HTML4S");
DJ_head("Double J FrameWork", $cfgCss, $cfgMeta);
DJ_modules("navigation", "option");
DJ_page("main_content.html", "mainContent");
DJ_dbconnect($cfgDatabase);

DJ_footer("copywrite", "Double J Web Design");

It all works perfectly but I'm starting to question having a bunch of  
function calls like that or should I simply have a big master  
DJ_displayPage() call?


or should I have my framework create the html files? Has anyone gone  
down this road before? any pitfalls I should watch out for that aren't  
in google yet? :)


Thanks everyone!

Jason Pruim


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php