Web Development

Is there a UI pack that compliments a framework?

webdev: reddit for web developers - Thu, 11/15/2018 - 08:17

Im building a project with Foundation and i find that i could do with a pack that allows me to style input elements etc a little bit better and give them better functionality. Like a date picker etc.

I have found a few that offer a grid. But all i want is a JS ui kit essentially.

Anyone know one?

submitted by /u/JustDaz
[link] [comments]
Categories: Web Development

Is there a better way to handle image optimization than doing it manually?

webdev: reddit for web developers - Thu, 11/15/2018 - 08:12

Most of the sites I work with are wordpress with a few on bootstrap.

When it comes to image optimization I do as follows,

  • Photoshop Save for Web
  • Check with Google Page Speed and download optimized images and replace them from the uploads/other folders.

This is time consuming and doesn't get all the images. Wordpress saves multiple copies of the same image in different sizes and what I do replaces just one sized image.

I again repeat this process for JS, CSS file to minify them.

I considered installing the page speed module but my host advised against it.

Is there any other way to do this? Or a tool that does it automatically?

submitted by /u/me2sop
[link] [comments]
Categories: Web Development

Cant get virtual hosts to work on MAMP. Help?

webdev: reddit for web developers - Thu, 11/15/2018 - 07:59

I swear I have tried to get this to work dozens of times, but I have never had it going successfully. So can someone tell me how I am an idiot?

What I want to do is type https://testsite and be taken to ~/Dropbox/Sites/testsite/public (where I have an htaccess that redirects all requests to index.php).

Ok ... here are my steps

  1. My document root for MAMP is set to /Applications/MAMP/htdocs
  2. In MAMP/conf/apache/extra/httpd-vhosts.conf I add an entry

apache <VirtualHost *:80> DocumentRoot "/Users/mp2018/Dropbox/Sites/testsite/public" ServerName testsite </VirtualHost>

  1. In my /private/etc/hosts I add an entry

apache testsite

I think that should be everything right?

I turn MAMP servers on and off to register the change.

But when I type 'testsite' I go to my normal apache home folder /Library/WebServer/Documents

When I type localhost I go to the same folder.

And when I type localhost:8888 I go to the MAMP/htdocs folder.

But I cant get to my /Users/mp2018/Dropbox/Sites/testsite/public folder like I want!

I can NEVER get these virtual hosts to work. Not with MAMP or without.

The only thing I can think is the entry in httpd-vhosts.conf says port:80. MAMP is set to be working on port:8888. I'm not sure exactly how all this works together, but even when I use :8888 in the httpd-vhosts.conf it doesnt seem to make anything different.

Can anyone tell me where I am going wrong?

submitted by /u/Tychonaut
[link] [comments]
Categories: Web Development

What qualifies a dev to write a Medium article?

webdev: reddit for web developers - Thu, 11/15/2018 - 07:41

All sarcasm aside, I’ve seen my fair share of cringe-worthy Medium articles riddled with typos written by someone who seems like they just learned about the topic they’re writing on. Is anyone aware of any criteria? Genuinely curious.

submitted by /u/trblackwell1221
[link] [comments]
Categories: Web Development

Is there a CMS for a user community to use to submit/modify their content?

webdev: reddit for web developers - Thu, 11/15/2018 - 05:55

I'm familiar with having a CMS for a client's website so they can deal with their content by themselves, but what about websites where users are signing up accounts and submitting their own content within a community(along with some moderation).

Is there a CMS for handling this sort of thing, or is it more of a DIY setup with CRUD and user management? The use case I'm inquiring about has users submit content, but it's not made public to other users until it's been approved by moderators(potentially other users in the community that are trusted).

Is there a headless type of CMS with an API that can be used with a custom frontend for these processes? Things like back pressure or user limits on file size limits(or max storage) to tackle malicious behaviour I assume might need to be custom developed on top of that?

submitted by /u/kwhali
[link] [comments]
Categories: Web Development

What was wrong with SOAP and WSDLs?

webdev: reddit for web developers - Thu, 11/15/2018 - 04:51

I’m a new grad web developer and I’ve pretty much exclusively worked with REST apis as everywhere seems to preach their benefits.

The other day I happened to work on something that involved an old Java EE app that was using a SOAP based API.

I was blown away.

It seems like with SOAP the API is so well specified. I can read a single file and know the exact request and response types down to the exact types of the data structures?

Not only that but I can automatically generate client libraries for my API?

This might be naive but SOAP seems worlds better than REST from my impression.

REST feels so wishy washy and undefined as if no one actually understands how it should actually work. I’ve seen otherwise really good developers put verbs in the resource paths, and some operations feel really awkward to model in REST.

Furthermore it seems to rely on the developers to write good API docs which might get out of date easily.

To me it almost seems like REST vs RPC is like JavaScript vs a strong typed language. It seems better at first but falls apart when you start needing stronger structure and guarantees.

Now with that said, I wanna know why SOAP is actually terrible.

I’ve heard a lot of hate towards it and seeing as it sounds like it was abandoned I’m assuming I’m missing some crucial flaw here...

Was it about interoperability?

I can see how it’s easier to setup a quick request to a REST API in any language compared to XML but I’d have thought generated client libraries would solve this issue...

submitted by /u/arduinomancer
[link] [comments]
Categories: Web Development

How to implement animation design with `react-spring` ?

webdev: reddit for web developers - Thu, 11/15/2018 - 04:47

In the project's repo the react-redux app is set with CSS in JS files. Now I'm supposed to animate pictures with mouse hover just like this website : https://www.madwell.com/

The component was initially a functional component and I have changed that to a class based component as follows:


class BannerContainer extends React.Component{ constructor(props){ super(props); this.state = { x: 0, y: 0 }; this.handleMouseMove = this.handleMouseMove.bind(this); } componentDidMount(){ window.addEventListener("mousemove", this.handleMouseMove); } componentWillUnmount(){ window.removeEventListener('mousemove', this.handleMouseMove); } handleMouseMove({ x, y }){ this.setState({ x : x / window.innerWidth, y : y / window.innerHeight }) } render(){ const { banner = {} } = this.props; const { title = '&nbsp;<br>&nbsp;', text = '&nbsp;<br>&nbsp;', image__google_350x80 = '', image__app_350x80 = '', image__bg1_1166x1878 = '', image__bg2_961x1782 = '', image__curve_730x151 = '' } = banner; return ( <Container> <BGPatch> {console.log(this.state.x , this.state.y)} <img src={'/images/bg_purple.jpg'} alt="" /> </BGPatch>


In this example I am able to get listen to the mouse-move event and and get the x & y coordinates accordingly. But now I have to use react-spring library to implement it so how do I do that? Also the CSS should be written in separate JS file for each component where as in react-spring example they directly modify the opacity or trasform in the Spring component directly as well which is what I don't want

the spring component example given on their docs

<Spring from={{ opacity: 0 }} to={{ opacity: 1 }}> {props => <div style={props}>hello</div>} </Spring> submitted by /u/tapu_buoy
[link] [comments]
Categories: Web Development

Is the “student” part of a student internship position usually strict?

webdev: reddit for web developers - Thu, 11/15/2018 - 04:16

I’m a Seattle resident. I recently graduated with a degree in math, but found that my favorite parts of my degree were when I got to code. So right now I’m in a web dev boot camp as a supplement to my degree. The issue I’m having now is that since I don’t have a CS degree, I’m not sure I’ll be prepared for a full time Junior development job. However, virtually ALL internships I’ve seen around here specify that they’re for students. Generally speaking, is this a strict requirement (especially since there are so many CS students from UW), or should I apply anyway?

submitted by /u/dudebobmac
[link] [comments]
Categories: Web Development

How can I make nurses in a hospital database only access their own patients and only some columns? should I create a view for every single nurse or is there a better way? (PostgreSQL)

webdev: reddit for web developers - Thu, 11/15/2018 - 02:43

So lets say I have a patient table

I want the nurse to only access his patients in this table and only some rows of that patient

is the only way to do this is to create a view? I kinda forgot about views so how can I specify this that every nurse can only access his own patients and only some columns?

I have one patient table and one nurse-patient table which includes their ID

but I don't know how can I specify that a nurse can only access his own patients? because in this way I have to make a view for every single nurse!! is there any better way? like with one view or a simpler way make this happen ?

submitted by /u/PabloSkywalk
[link] [comments]
Categories: Web Development

Why do some sites ask you to agree to "we are using cookies" even when you're a guest user?

webdev: reddit for web developers - Thu, 11/15/2018 - 02:26

What is the purpose of this and are they saving the agreements or something?

submitted by /u/eggtart_prince
[link] [comments]
Categories: Web Development

Javascript Devs - Is this how you do it?

webdev: reddit for web developers - Thu, 11/15/2018 - 01:38

Hey all,

I'm coming from PHP and I'm trying to develop a Single Page Application using Adonis, React and Postgres... Right now I'm trying to figure out how to make this application be dynamic or at least setup the foundation for it to be. That is, when I make changes to the model or database, it will reflect changes to the client UI.

My issue right now is with trying to decide on how to deal with (UI) base settings, permissions, and user settings. Based on these categories, the UI could look different. For instance, under base settings, we have orders table with all of the columns. The user settings will decide what items are hidden/shown and so on. Adonis has a great way of handling permission so that isn't an issue right now.

Right now my issue is with base/user settings and my best thought is to create the following tables:

- views (all of the pages that users can go to

- components - belongs to views (includes all page information -menus,options, etc.)

- user_settings - belongs to components (includes users settings for each component)

Once the user logs into the SPA, I'll load the relevant user page/component and user settings to render the appropriate view. Right?

Can anyone tell me if this looks right or if anyone can point me in the direction of good material to read. Google hasn't been to useful in this case.

Any help would be appreciated.

submitted by /u/FlandersFlannigan
[link] [comments]
Categories: Web Development

[React] create-react-app and service worker for persistent notifications

webdev: reddit for web developers - Thu, 11/15/2018 - 01:35

I'm creating a react app using create-react-app and I want to be able to send notifications with a service worker, but react already has a service worker. If I register my own service worker won't that replace create-react-app's service worker? I can register and use my own service worker, but I don't want to replace create-react-app's default functionality and I don't want to "eject". However when I check the registered service workers under the application tab (without registering my own service worker) I see nothing. Does create-react-app's service worker unregister itself? How can I use my own service worker without replacing create-react-app's?

submitted by /u/FL4D
[link] [comments]
Categories: Web Development