*.php vs *.lc?

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sms5138
Posts: 126
Joined: Mon Feb 23, 2015 11:49 pm

*.php vs *.lc?

Post by sms5138 » Wed Aug 26, 2015 2:58 pm

Hi everyone,

I'm working through a middleware solution for a project that i'm working on, and have seen multiple examples. Some use .php while some use .lc. I'm wondering if this is just based on personal preference/comfort level with the given language, or is one more secure than another?

Thank you in advance!

-Sean

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: *.php vs *.lc?

Post by ghettocottage » Wed Aug 26, 2015 4:39 pm

Some more experienced developers might chime in here, but my thought is that you are correct: it is just based on personal preference/comfort level with the given language.

PHP or Livecode will be as secure as you make it.

Personally, I prefer to use Livecode as the middleware since I can use the same functions and language in the front-end and back-end. Although I am more familiar with PHP, I enjoy Livecode language more, and often find myself in a web-project where I am trying to tell php to do something and forget that I cannot simply say "put it into myVariable"

sms5138
Posts: 126
Joined: Mon Feb 23, 2015 11:49 pm

Re: *.php vs *.lc?

Post by sms5138 » Wed Aug 26, 2015 8:15 pm

Thanks for getting back to me!

I have to agree with you. I've already started tinkering with a .lc solution, and using some pretty helpful resources here in the forum.

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: *.php vs *.lc?

Post by Dixie » Wed Aug 26, 2015 9:51 pm

I have to agree with 'ghettocottage'.. I use .lc files for the simple reason you use liveCode in the script of the files... it makes it all seamless... :-)

sms5138
Posts: 126
Joined: Mon Feb 23, 2015 11:49 pm

Re: *.php vs *.lc?

Post by sms5138 » Thu Aug 27, 2015 3:49 pm

I've started using .lc, and am liking it so far. As you guys said it is pretty seamless, and straight forward. One question i have (that may be pretty simple) how to you take the data that's sent back from the .lc script, and put it into a datagrid?

I'm able to get it to complete the query like i want, and pull the information that i need, but do not know how to move that variable into a datagrid.

Any help you may have would be greatly appreciated.

Thanks!

Sean

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: *.php vs *.lc?

Post by ghettocottage » Thu Aug 27, 2015 4:48 pm

Something like this (if your variable is named tQuery):

Code: Select all

      set the dgText of group "DataGrid" to tQuery

Next step is learning to encrypt your data to and from the server.
I started playing with that, but only got as far as encrypting to the server (no back)..but what I have has been working well. If I can find time today I will put it on Github

sms5138
Posts: 126
Joined: Mon Feb 23, 2015 11:49 pm

Re: *.php vs *.lc?

Post by sms5138 » Mon Aug 31, 2015 2:42 pm

Hey!

Sorry it took so long to get back to you! life got a bit busy, but wanted to thank for your help. looks like that did the trick!

regards,

Sean

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: *.php vs *.lc?

Post by sphere » Fri Sep 18, 2015 9:03 am

It also depends were your webserver is running. Many hosts do not run LC or even know LC or just do not allow you to run it.
So then you have to use PHP.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9833
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: *.php vs *.lc?

Post by FourthWorld » Fri Sep 18, 2015 9:50 am

LiveCode is as easy to install as any other CGI program. While it's convenient when you can find a host like mHost.com or on-rev.com with LC Server preinstalled, it can usually be installed in nearly any other host minutes.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: *.php vs *.lc?

Post by sphere » Fri Sep 18, 2015 8:37 pm

I followed this: http://lessons.runrev.com/m/4070/l/3665 ... a-htaccess

but i get a forbidden 403 error

So i'll have to request my host if it is allowed.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9833
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: *.php vs *.lc?

Post by FourthWorld » Fri Sep 18, 2015 8:42 pm

sphere wrote:I followed this: http://lessons.runrev.com/m/4070/l/3665 ... a-htaccess

but i get a forbidden 403 error

So i'll have to request my host if it is allowed.
If your host doesn't provide SSH access to your server it's not a good fit for development. If they do, you should be able to set the required permissions yourself without need to wait for them.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: *.php vs *.lc?

Post by sphere » Fri Sep 18, 2015 8:52 pm

I just checked, they only provide SSH on a dedicated server :cry:

Post Reply

Return to “Databases”