• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Web Design and Development |OT| Pixel perfect is dead, long live responsive design

It's not my code, it's a project we've done but another developer is doing the updates on this project and he's submitted that code to be added and it instantly jumped out at me on the version control software.

Although John B makes a good point for using the db wrapper it also comes with some slight overhead and may not scale amazingly well. Personally I would want to roll my own so I know what is happening.

I would advise against doing stuff like mysql_open / mysql_query directly in your controllers.

This 100%. Controllers are meant to deal with the request only and should have no notion of the service or data access/data store layers.
 

Daffy Duck

Member
I thought as much. I don't know a great deal about codeignitor but that stood out like a sore thumb!

It's been done on several pages too.

🙄😏
 

BillyJack

Banned
This isn't really the thread to ask but I figured I would try just in case.
Any of you have experience with setting up MYSQL databases?
 
I was hoping for a bit of advise, most of my experience was based in front-end web development with a bit of PHP, JavaScript and a little MySQL thrown in. But just as I was beginning to get the hang of things, I kinda got roped into doing a couple of wordpress sites over the last six months, and now I feel I am way behind the curve. I was wanting to jump back into things, but I want to make a shift and focus on learning the backend. I was wondering where the best place to start would be. I know Ruby (and Rails) was popular a while ago, but I'm not sure if that is still the case, or if it is even the best place to start.
 

Somnid

Member
I was hoping for a bit of advise, most of my experience was based in front-end web development with a bit of PHP, JavaScript and a little MySQL thrown in. But just as I was beginning to get the hang of things, I kinda got roped into doing a couple of wordpress sites over the last six months, and now I feel I am way behind the curve. I was wanting to jump back into things, but I want to make a shift and focus on learning the backend. I was wondering where the best place to start would be. I know Ruby (and Rails) was popular a while ago, but I'm not sure if that is still the case, or if it is even the best place to start.

Rails is still used throughout the industry but it's not as popular a starting point for new projects anymore. General open-source stacks are all over the place, some use Java, some use Go, some use Ruby but probably the easiest to transition to that is still fairly hype is node.js. Node is used for all those fancy front-end build tools and task runners so it's a good thing to have no matter where you go. Alternatively Microsoft's stack is ASP.NET MVC but the cool kids don't tend to use it.
 
Rails is still used throughout the industry but it's not as popular a starting point for new projects anymore. General open-source stacks are all over the place, some use Java, some use Go, some use Ruby but probably the easiest to transition to that is still fairly hype is node.js. Node is used for all those fancy front-end build tools and task runners so it's a good thing to have no matter where you go. Alternatively Microsoft's stack is ASP.NET MVC but the cool kids don't tend to use it.

Cool thanks for your help :) Would you also be able to say if there any prerequisite skills I should know before diving in?
 

Lister

Banned
Rails is still used throughout the industry but it's not as popular a starting point for new projects anymore. General open-source stacks are all over the place, some use Java, some use Go, some use Ruby but probably the easiest to transition to that is still fairly hype is node.js. Node is used for all those fancy front-end build tools and task runners so it's a good thing to have no matter where you go. Alternatively Microsoft's stack is ASP.NET MVC but the cool kids don't tend to use it.

Hey! I'm cool! My 3 year old told me so just this morning, and if he would know, he's hip to that street jive.
 
Should I continue learning Python as my Object Oriented language of choice or switch to a more common language used for web applications like Ruby?
 

grmlin

Member
PHP in it's current state is pretty awesome. A lot of bigger projects I worked on in the past years used it with great success. And it has an insanely large community, I would say that every problem you might face was solved by someone already ;)
Beside that, it's really easy to get it running.
If you look into something like Laravel (https://laravel.com) you'll see, that the old days of php spaghetti chaos are long gone.


If PHP is not your cup of tea I would probably look into Node or Java. Java because it's used in many Enterprise environments, Node because it's hyped through the roof.
Another thing you could consider is looking into Webapps with REST APIs. React, Vue... In the end it all depends on the work you want to do in the future :)


Should I continue learning Python as my Object Oriented language of choice or switch to a more common language used for web applications like Ruby?

Personally I think ruby is pretty niche itself. But that's just me, maybe it's just not as popular as other languages here in Germany.
 

Somnid

Member
Hey! I'm cool! My 3 year old told me so just this morning, and if he would know, he's hip to that street jive.

I work for a .NET shop. It has it's ups but the customers are pretty enterprisey and don't mind paying out the ass the for licensed software (not that C#/.NET is the problem but the database products and shitty CMS/Reporting systems that they choose with it are really expensive). Smaller houses and startups won't touch it and neither will larger enterprises who aren't in bed with MS. Actual development environment is actually pretty nice compared to some alternatives like Java or PHP.

PHP still runs most of the web, for better or worse

You mean a bunch of wordpress marketing sites and blogs. Facebook is about the only big player that probably still uses PHP to some capacity. At this point it's pretty much the language of wordpress, which is the king of CMSs.

Should I continue learning Python as my Object Oriented language of choice or switch to a more common language used for web applications like Ruby?

Python's pretty legit for web and for non-web, also machine learning. Much more flexibility than Ruby.
 

grmlin

Member
Could someone do me a favour.

This booking form here http://www.prelovedbridalboutique.co.uk/book-online what is this made in?

Looking at the code I assume Angular? Is this something that is just off the shelf or does it appear to be bespoke?

I don't really know much about Angular to be honest.

Looking at the source code, I see react-ids. So it most likely is React :)

Edit: yeah, devtools are available, so if you open the page in chrome with React Devtools installed, you'll see the details
 

this_guy

Member
Could someone do me a favour.

This booking form here http://www.prelovedbridalboutique.co.uk/book-online what is this made in?

Looking at the code I assume Angular? Is this something that is just off the shelf or does it appear to be bespoke?

I don't really know much about Angular to be honest.

If you use Chrome or Firefox there's an extension called Wappalyzer that shows what tools were used to build a page. That's a React page (and it also uses a few other Javascript frameworks according to wappalyzer).
 

grmlin

Member
Hey React developers. I need a UI library for a quick prototype we want to build the next days (shop thingy), and I don't want to go the material or bootstrap route if I don't have to.

Anyone used grommet or semantic-ui? Semanti-UI looks pretty good.

Thanks!
 

Lister

Banned
Question for you guys, especially ont he server side.

We've got a client that wants us to check if people coming into our portal have visited their site recently.

The only way I can think of doing that is to use cross domain cookies set by the client on their site that include our domain (probably using a pixel). I think some browsers block these third party cookies, but not many. another issue would be that we could only track people who had visited their site after the pixel was placed.

Anything else we could do?


Edited after a little reading.
 
Can anyone recommend a good SEO optimizing website?

Depends on your budget, but I've worked with a company called Cardinal Path in the past: http://www.cardinalpath.com/

They're a digital marketing consulting firm, and they're very good. But they're also very expensive.

If you're looking to follow general guidelines and possibly purchase a self-managed service, Moz.com is good and affordable.

Hey React developers. I need a UI library for a quick prototype we want to build the next days (shop thingy), and I don't want to go the material or bootstrap route if I don't have to.

Anyone used grommet or semantic-ui? Semanti-UI looks pretty good.

Thanks!

I've never used grommet, but used Semanti UI for a project and was really happy with it. Primarily coming from Bootstrap and Foundation, I found it a lot more customizable and light weight, doing less work than customizing. Foundation or Bootstrap. I liked that the class names were simple and descriptive of what you were building (this especially compared to Foundation 4 or 5, which uses insider words to describe components). If there's one drawback, it's that the simple naming pattern would also mean that some elements would have 6 or 7 chained classes one after the other, which is expressive and clear what you're building, but can also be redundant and take some time to construct them all. But, still, I liked using Semantic. It wasn't a React project though, but don't think that matters.
 

grmlin

Member
Depends on your budget, but I've worked with a company called Cardinal Path in the past: http://www.cardinalpath.com/

They're a digital marketing consulting firm, and they're very good. But they're also very expensive.

If you're looking to follow general guidelines and possibly purchase a self-managed service, Moz.com is good and affordable.



I've never used grommet, but used Semanti UI for a project and was really happy with it. Primarily coming from Bootstrap and Foundation, I found it a lot more customizable and light weight, doing less work than customizing. Foundation or Bootstrap. I liked that the class names were simple and descriptive of what you were building (this especially compared to Foundation 4 or 5, which uses insider words to describe components). If there's one drawback, it's that the simple naming pattern would also mean that some elements would have 6 or 7 chained classes one after the other, which is expressive and clear what you're building, but can also be redundant and take some time to construct them all. But, still, I liked using Semantic. It wasn't a React project though, but don't think that matters.

Thanks for sharing your thoughts!!!

I went with grommet though. I really like it even if it lacks in quantity of components compared to the other options.

In the end it was the fact that it was build for React from the ground up, and not adopted to it like the others. That made me choose it.

It's very well done, has good documentation and works great. Really recommended.
 
Depends on your budget, but I've worked with a company called Cardinal Path in the past: http://www.cardinalpath.com/

They're a digital marketing consulting firm, and they're very good. But they're also very expensive.

If you're looking to follow general guidelines and possibly purchase a self-managed service, Moz.com is good and affordable.



I've never used grommet, but used Semanti UI for a project and was really happy with it. Primarily coming from Bootstrap and Foundation, I found it a lot more customizable and light weight, doing less work than customizing. Foundation or Bootstrap. I liked that the class names were simple and descriptive of what you were building (this especially compared to Foundation 4 or 5, which uses insider words to describe components). If there's one drawback, it's that the simple naming pattern would also mean that some elements would have 6 or 7 chained classes one after the other, which is expressive and clear what you're building, but can also be redundant and take some time to construct them all. But, still, I liked using Semantic. It wasn't a React project though, but don't think that matters.

I was looking for something more basic and free, I remember a website that tells you if you are missing alt attributes in your images, meta tags,etc
 

Somnid

Member
Just started taking a look at elm. I kinda like it. I'd say it's too damn monolithic for it's own good but then again so is Angular. Syntax was really easy to get into as it's just diet Haskell.
 
I was looking for something more basic and free, I remember a website that tells you if you are missing alt attributes in your images, meta tags,etc

I'm sure those still exist. Google for like HTML Validators and that should show up.

SEO has become more complex than meta tags and alt tags (neither of which will improve your search engine placement, though are still generally good to have). Keyword density and domain authority are the two strongest contributing factors, with keyword density being the one thing you can really control in your content.

If you're using a CMS like WordPress, plugins like All in one SEO and Yoast do a decent job at indicating gaps in your keyword density or other critically missing elements (like title tags or header use). Otherwise, free services like Google Webmaster Tools (might be called Google Search Console now) and Moz.com's free service will give you good information that you can act on.
 
What would be the easiest way of setting up a rails project to use MySQL? I have been trying a bunch of things and I don't seem to be getting anywhere.

Edit:

For a general gist of what is happening:

rails new AppName -d mysql

cd AppName

sudo mysql.server start

Which ends up giving me this error message:

ERROR! The server quit without updating PID file (/usr/local/var/mysql/MacBook-Pro.local.pid).

and when I try to start the rails server it gives me:

Mysql2::Error (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)):

edit:

For a bit more information, this is the full message that comes up when I try to run the server:

Starting MySQL
./usr/local/Cellar/mysql/5.7.17/bin/mysqld_safe: line 586: /usr/local/var/mysql/mysqld_safe.pid: Permission denied
awk: i/o error occurred while closing /dev/stdout
input record number 1, file
source line number 1
ERROR! The server quit without updating PID file (/usr/local/var/mysql/########.local.pid).
 
Regarding my earlier posts, I am still pretty new to rails, and I am wondering if there is a better way to be developing my app. I have been struggling to set up either a Postgres or MySQL database, and want to avoid using Sqlite since I heard it doesn't handle concurrent writers very well. So is there an easier way of setting up my development environment, or if there is software that can help me.
 
What would be the easiest way of setting up a rails project to use MySQL? I have been trying a bunch of things and I don't seem to be getting anywhere.

Edit:

For a general gist of what is happening:

rails new AppName -d mysql

cd AppName

sudo mysql.server start

Which ends up giving me this error message:

ERROR! The server quit without updating PID file (/usr/local/var/mysql/MacBook-Pro.local.pid).

and when I try to start the rails server it gives me:

Mysql2::Error (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)):

edit:

For a bit more information, this is the full message that comes up when I try to run the server:

Starting MySQL
./usr/local/Cellar/mysql/5.7.17/bin/mysqld_safe: line 586: /usr/local/var/mysql/mysqld_safe.pid: Permission denied
awk: i/o error occurred while closing /dev/stdout
input record number 1, file
source line number 1
ERROR! The server quit without updating PID file (/usr/local/var/mysql/########.local.pid).

It's a permission issue. Change the ownership with `chmod -R 777 /usr/local/var/mysql/` and try again
 
It's a permission issue. Change the ownership with `chmod -R 777 /usr/local/var/mysql/` and try again

It gives me this:

chmod: Unable to change file mode on /usr/local/var/mysql/: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//########.local.err: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//#######.pid: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//auto.cnf: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//ca-key.pem: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//ca.pem: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//client-cert.pem: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//client-key.pem: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//ib_buffer_pool: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//ib_logfile0: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//ib_logfile1: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//ibdata1: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//ibtmp1: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//mysql: Operation not permitted
chmod: /usr/local/var/mysql//mysql: Permission denied
chmod: Unable to change file mode on /usr/local/var/mysql//mysql: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//performance_schema: Operation not permitted
chmod: /usr/local/var/mysql//performance_schema: Permission denied
chmod: Unable to change file mode on /usr/local/var/mysql//performance_schema: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//private_key.pem: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//public_key.pem: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//server-cert.pem: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//server-key.pem: Operation not permitted
chmod: Unable to change file mode on /usr/local/var/mysql//sys: Operation not permitted
chmod: /usr/local/var/mysql//sys: Permission denied
chmod: Unable to change file mode on /usr/local/var/mysql//sys: Operation not permitted
 

this_guy

Member
Try the command again but use 'sudo' at the beginning for root permissions.

Though from a security stand point it's probably not a good idea to have '777' for MySQL permissions. It's probably better to have MySQL and Ruby share ownership or a group.
 
Try the command again but use 'sudo' at the beginning for root permissions.

Though from a security stand point it's probably not a good idea to have '777' for MySQL permissions. It's probably better to have MySQL and Ruby share ownership or a group.

I tried this, then:

mysql.server start

But it gave me this error:

Starting MySQL
.................................................................................................... ERROR! The server quit without updating PID file (/usr/local/var/mysql/my-MacBook-Pro.local.pid).
 

grmlin

Member
If you have so much trouble setting it up on your system (what OS do you use btw?), you could use docker.

I'm pretty sure there will be some containers with all you need to get started.
 
I am beginning to think Rails might be a little too advanced for me at this stage, basically the website I am wanting to make is similar to a forum wherein people will be able to log in and make threads and comments. Only what it is actually used for, is not a forum, it will make sense once I have built it. Might I be better off just building it with bootstrap and using php to link it to my database?
 

grmlin

Member
macOS Sierra.

By containers and dockers what do you mean?

Well, a Mac is a very solid platform to develop locally. I'm not a ruby or rails guy, so I can't help with your problem sadly.


Docker is a software to run virtual machines from containers without UIs etc.

https://www.docker.com/what-docker

There are tons of containers you can install and use without any setup. And they are pretty easy to configure.


What's the reason to learn rails? Here in Germany it's almost dead I would say. Is it still popular in the US?
 
Well, a Mac is a very solid platform to develop locally. I'm not a ruby or rails guy, so I can't help with your problem sadly.


Docker is a software to run virtual machines from containers without UIs etc.

https://www.docker.com/what-docker

There are tons of containers you can install and use without any setup. And they are pretty easy to configure.


What's the reason to learn rails? Here in Germany it's almost dead I would say. Is it still popular in the US?

I decided on rails mainly because I heard it was easy and fast to develop with. Also there still seems to be a reasonable demand for it in the UK.
 

Run your command with 'sudo' in front of it. It's almost definitely a permissions issue.


WHen you installed Ruby, Rails, etc., did you use a package installer like Homebrew? Homebrew installs are usually cleaner and usually have fewer permissions issues (usually, not always).

Also, Rails is definitely not dead... Ruby is a great programming language, and Rails is still one of the top web application frameworks. It's worth learning and used widely. I also endorse using something like Docker and using a Ruby/Rails container.

I am beginning to think Rails might be a little too advanced for me at this stage, basically the website I am wanting to make is similar to a forum wherein people will be able to log in and make threads and comments. Only what it is actually used for, is not a forum, it will make sense once I have built it. Might I be better off just building it with bootstrap and using php to link it to my database?

Bootstrap is a front-end framework that helps you with layout and front-end UI components, and you can use Bootstrap on any platform like Rails, PHP, Node/JS, Python, Java, etc. Personally, I think that Rails is easier to get started with than PHP is... But the benefit of going the PHP route is that you can download a MAMP/XAMP server package and start up in a couple of minutes, which everything pre-configured for you. Starting your Rails project will take a little more effort, and understanding of the commands that you're running in terminal.
 

grmlin

Member
Depending on your background PHP might be the way easier language, as it has a somewhat classic syntax, while ruby is pretty special.

Good to hear that rails is still a thing. If you don't work with it (like me) it feels like it's gone as no one ever talks about it these days with all the other hypetrains.
We are only a small team and do almost everything with PHP (Laravel) these days.
 

Foggy

Member
So I may be in the job market soon since my near future wife is going to take up travel nursing and I was curious where I stand in terms of what employers look for. I've been at the same job for 4 years straight after community college and for 2 1/2 of those years my work consisted of PHP/CakePHP and then most recently Python/Django with Angular. Do employers only care about that magical "at least 3 years of experience" as cumulative or for the primary language they use?

It's also been a very green work environment. Most developers who have worked here were entry level and only for the past year did I have anything approaching a mentor. But no code reviews, no real stability, just constant work on a rehaul of sports facility scheduling web software that hasn't been released yet. How behind the curve am I? My work probably isn't pretty but it got the job done for something so ambitious with little resources. The Cakephp project was nearly ready but a senior developer came in and convinced the owner to scrap it for a Django project with a microservices architecture(lots of api calls). So yeah, experience with multiple languages and real development work, but lacking in direction and ultimately no commercial release? That's my sob story, am I in a better position than I think I am or do I need to get out yesterday and find a junior position somewhere with a better environment?
 
Wordpress related
Anyone can help me? I'm trying to insert a shortcode for contact form 7 in every page, but I'm having serious difficulties in doing that. I tried to use the Add to all plugin, then I tried to use do_shortcode in template files, nothing works.
 

gutshot

Member
Wordpress related
Anyone can help me? I'm trying to insert a shortcode for contact form 7 in every page, but I'm having serious difficulties in doing that. I tried to use the Add to all plugin, then I tried to use do_shortcode in template files, nothing works.

do_shortcode should work. What file are you adding it to and where are you inserting it?
 
Top Bottom