- Pseudo-God
- Mar 13, 2006
-
I just love oranges!
|
I am confused about how to setup and test a website before launch with SSL certs. Basically I am doing a redevelopment of a website for someone and we are about to launch in the next week. They are scared of the old the old developer so we just want to switch over the domain on launch day to point to the new server without telling them. I am confused about how to buy/setup and test the SSL certificate that will sit on our signup/payment page when I don't have control of the domain yet. I just want everything setup so when the domain name transfer propagates everything is there sitting waiting to go.
This is not a technical problem, so a technical solution should not be applied. Just tell the old dev to get hosed or something. This calls for a baseball bat, not a week of clandestine coding.
|
#
¿
Jun 25, 2013 21:53
|
|
- Adbot
-
ADBOT LOVES YOU
|
|
#
¿
Apr 27, 2024 07:48
|
|
- Pseudo-God
- Mar 13, 2006
-
I just love oranges!
|
I'm converting a simple app I have to Codeigniter and a MVC structure is all new to me. I'm trying to figure out how to best structure this app.
It's a pretty simple to-do list that uses the nestedSortable jQuery plugin. My PHP queries/prints all the root level items, and whenever it runs into a folder it also prints all of the items within the folder.
My question stems from the contents of the folder needing to be within <ol> tags. Is this how I should approach printing a folder (within a controller)?
$this->load->view('templates/folderStart.php', $item); //has <ol> tag
$this->print_folder_items($whatever);
$this->load->view('templates/folderEnd.php', $item); //has </ol> tag
Just seems kind of messy.
Usually you would handle the printing and the layout in the view. Pass the items to the view, and you can put conditionals, HTML tags and the like in there. Don't fill up your controller with non-business logic.
|
#
¿
Jun 28, 2013 07:33
|
|
- Pseudo-God
- Mar 13, 2006
-
I just love oranges!
|
What I also wanted to mention was that it's OK to put complex code in the view, as long as the presentation of the data is the main goal of the code. For example, putting code like the following is perfectly fine:
php:<?
if(is_logged_in())
{
$this->load->view("user_control_panel");
}
else
{
$this->load->view("login_form");
}
?> It's also OK to iterate through a variable amount of items, like database entries, but only as long as the data comes from the controller in a PHP container.
|
#
¿
Jun 28, 2013 23:46
|
|
- Pseudo-God
- Mar 13, 2006
-
I just love oranges!
|
So, I've had a toy idea for a Twitter account that I want to generate tweets and send them out on a (non-annoyingly) consistent basis, but I'm wrestling with the best way to do a high-level implementation.
I have a server sitting around I want to put to use, and my thought is to write something in PHP that will generate the tweet string, then make a POST request to the Twitter API. Presumably I'll need the PHP OAuth extension to integrate the account I need (as per v1.1 of the API) as well.
However, if I do it in PHP, I'll either have to make the request manually or set up a cron job. The other alternative is to write a Python script that would maintain an uptime and make the same RESTful requests as above.
Does this sound reasonable, or am I way off here?
Yeah, your implementation idea is fine. I am not sure how the authentication will work (as I have not worked with the twitter API), but the rest of your implementation is perfectly adequate.
|
#
¿
Jul 2, 2013 09:41
|
|
- Pseudo-God
- Mar 13, 2006
-
I just love oranges!
|
Suggesting that you move away from IE8 is not a bad suggestion to be honest. If you don't have any ActiveX apps or some other ancient software, I would strongly advise you to upgrade to Chrome or IE10.
|
#
¿
Jul 10, 2013 15:54
|
|
- Pseudo-God
- Mar 13, 2006
-
I just love oranges!
|
Who knows, IE is dumb like that. It's the source of lots of pain for anyone who works as a front-end developer.
|
#
¿
Jul 11, 2013 17:53
|
|
- Pseudo-God
- Mar 13, 2006
-
I just love oranges!
|
And what about building apps with backbone.js and the rest of the front-end libraries, which obviously don't work without JavaScript? Are we supposed to code our business logic twice, just to support a tiny minority of users?
|
#
¿
Aug 2, 2013 09:19
|
|
- Adbot
-
ADBOT LOVES YOU
|
|
#
¿
Apr 27, 2024 07:48
|
|
- Pseudo-God
- Mar 13, 2006
-
I just love oranges!
|
I've built a whole API based on Websockets.
I built loosely around some specification I found online about a best practice for communication. Where if you wanted to wait for a response you sent an `id` attribute along with the request. Then there was also a `method` attribute which was required.
There was some other stuff like how to format error responses and how I should allow arrays of requests, which could be run in any order. What was I looking at. Because at the time there was no javascript library available that did all that stuff, and I'd like to either check again or build one.
It sounds like JSON RPC 2.0
http://www.jsonrpc.org/specification
I use it on my WebSocket apps. However, when I work with node.js I use socket.io, which has a lot of cool stuff built in.
|
#
¿
Jan 24, 2018 21:01
|
|