Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



PT6A posted:

Do not look into Squarespace, it makes absolutely zero sense because it tries to be too flexible, in a very obtuse way because trying to replace things that you could do in three lines of code with a bizarre and ill-conceived GUI makes things much easier, right???

Except Wix is that, too? If you're going to have a nontechnical person doing updates, it doesn't really matter how many lines of code it would be. To them, it's hours of learning or drag some stuff around until it looks OK and hit save.

Adbot
ADBOT LOVES YOU

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

Munkeymon posted:

Except Wix is that, too? If you're going to have a nontechnical person doing updates, it doesn't really matter how many lines of code it would be. To them, it's hours of learning or drag some stuff around until it looks OK and hit save.

Except it's also incomprehensible to them, so they inevitably ask me to do something and I can't figure it out without a lot of work on my end. Maybe Wix is just as bad, I can't say I've used it.

Wordpress, though awful, is far better in this regard, and Shopify is a dream to work with by comparison. Both allow reasonably simple bypasses of the "basic" system to allow pros to accomplish things efficiently.

my bony fealty
Oct 1, 2008

PT6A posted:

Except it's also incomprehensible to them, so they inevitably ask me to do something and I can't figure it out without a lot of work on my end. Maybe Wix is just as bad, I can't say I've used it.

Wordpress, though awful, is far better in this regard, and Shopify is a dream to work with by comparison. Both allow reasonably simple bypasses of the "basic" system to allow pros to accomplish things efficiently.

What's awful about Wordpress?

A custom theme put together by a competent dev and a client who takes the 5 minutes they need to learn the admin dashboard is all you need to have a successful WP setup that requires minimal maintenance. Check it for updates once a week or so and you're set.

Yes, I realize those two things can be a lot to ask for.

Capri Sun Tzu
Oct 24, 2017

by Reene

my bony fealty posted:

What's awful about Wordpress?
Wordpress means PHP and MySQL so it's bound to get a lot of hate here. I have to maintain several Wordpress sites and I can tell you some of that hate is deserved, but I agree it's still the best CMS for most customers.

The Dave
Sep 9, 2003

Wordpress of olden days always was too much of a learning curve for the clients I worked with. Once something had to be done past the WYSIWYG text editor (like a custom field) they would miss it.

It seems like they've done some decent front end WYSIWYG stuff (or visual composer did) that seems like a much friendlier experience for those actually setting up the page past making a blog post.

I wish I had squarespace experience because I've heard mostly good things about it. I started messing with WIX last night because I'm trying to help my gym put a page together and that's the platform they've chosen. So far it looks pretty simple, but just laying a page out is a challenge regardless of the tool.

spiritual bypass
Feb 19, 2008

Grimey Drawer

my bony fealty posted:

What's awful about Wordpress?

The global state that governs the API, the database schema around meta values, the hand-rolled "prepared statement" system, having files besides index.php executable by the web server, no Composer, the refusal to fix any of these because it would break backwards compatbility...

None of that is due to PHP or MySQL, it's just that PHP makes it easier to run horrible things. You can write a 200 line function or SQL injection vulnerability in just about any language, of course.

spiritual bypass fucked around with this message at 17:19 on Mar 13, 2018

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

rt4 posted:

The global state that governs the API, the database schema around meta values, the hand-rolled "prepared statement" system, having files besides index.php executable by the web server, no Composer, the refusal to fix any of these because it would break backwards compatbility...

Exactly. It's a nicely usable system from the front end, but the architecture is garbage and as a result there can and have been security problems, efficiency problems, and certain common tasks are a nightmare to figure out. Overall, though, it's much much nicer than many alternatives.

A lot of people also try to use it for things that really are a bit more complicated than what WordPress was originally intended to handle, and it ends up becoming a web of plugins and weird poo poo that's nigh-unmaintainable, but that's not 100% WordPress's fault.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



PT6A posted:

Except it's also incomprehensible to them, so they inevitably ask me to do something and I can't figure it out without a lot of work on my end. Maybe Wix is just as bad, I can't say I've used it.

Wordpress, though awful, is far better in this regard, and Shopify is a dream to work with by comparison. Both allow reasonably simple bypasses of the "basic" system to allow pros to accomplish things efficiently.

If you're working with a client who's willing to pay to avoid doing the work, I think you're probably not in the SquareSpace/Wix market, then, sure. I believe the question was about a good product for someone nontechnical to set up their own online store and manage it themselves without paying someone to do it for them.

my bony fealty
Oct 1, 2008

Capri Sun Tzu posted:

Wordpress means PHP and MySQL so it's bound to get a lot of hate here. I have to maintain several Wordpress sites and I can tell you some of that hate is deserved, but I agree it's still the best CMS for most customers.

rt4 posted:

The global state that governs the API, the database schema around meta values, the hand-rolled "prepared statement" system, having files besides index.php executable by the web server, no Composer, the refusal to fix any of these because it would break backwards compatbility...

None of that is due to PHP or MySQL, it's just that PHP makes it easier to run horrible things. You can write a 200 line function or SQL injection vulnerability in just about any language, of course.

PT6A posted:

Exactly. It's a nicely usable system from the front end, but the architecture is garbage and as a result there can and have been security problems, efficiency problems, and certain common tasks are a nightmare to figure out. Overall, though, it's much much nicer than many alternatives.

A lot of people also try to use it for things that really are a bit more complicated than what WordPress was originally intended to handle, and it ends up becoming a web of plugins and weird poo poo that's nigh-unmaintainable, but that's not 100% WordPress's fault.

Legit thanks for the answers. For a while the majority of my web work was with WP and I really grew to love how easy it was to go from development -> client use, technical shortcomings be damned. Supposedly the future of WP is JavaScript so it will be interesting to see how the platform develops. A complete rewrite of the entire platform being announced wouldn't be that surprising.

On the flip side, the now-integrated REST API maybe alleviates some of these concerns? It is quite nice to have the user rely on the WP dashboard, while you're developing in whatever else strikes your fancy. But all the backend concerns are still there I imagine.

spiritual bypass
Feb 19, 2008

Grimey Drawer
The way I see it, you can get good at using anything with some practice, even if it's a bad piece of software. You have to get out and use other things to have some contrast.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
The only time I hate WordPress is when I get hired to fix a site someone else made, and they have installed dozens of plugins to do things that WordPress already does by default. So I can't figure out where, for example, to change the phone number in a header.

(The answer is usually that it's a module in a page builder plugin that has to be set for every single page individually.)

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
I am having difficulty believing Wordpress is still king of this castle

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

Nolgthorn posted:

I am having difficulty believing Wordpress is still king of this castle

Well, it really depends. It's not the best at anything, but occasionally you just get sick of arguing and telling people they should get something other than the $2/month slow-rear end garbage shared hosting plan that only supports PHP, and you decide to tell the client what they've convinced themselves they want to hear. It's good enough that it's frequently the path of least resistance.

Munkeymon posted:

If you're working with a client who's willing to pay to avoid doing the work, I think you're probably not in the SquareSpace/Wix market, then, sure. I believe the question was about a good product for someone nontechnical to set up their own online store and manage it themselves without paying someone to do it for them.

I seem to repeatedly run across people who want to avoid paying, but also want to avoid doing the work because they cannot handle the complexity of something like Wix or Squarespace. There is no limit to how computer-illiterate people can be.

caberham
Mar 18, 2009

by Smythe
Grimey Drawer
What do you guys think of a Django deployment for a business website with sporadic updates?

huhu
Feb 24, 2006

caberham posted:

What do you guys think of a Django deployment for a business website with sporadic updates?

Who is doing the sporadic updating? Could you store all the site's data in a DB and then teach whoever how to use the Django Admin? You've got a pretty vague question there. "Is the most popular Python backend framework good for building a website?"

caberham
Mar 18, 2009

by Smythe
Grimey Drawer
The customer / user with some tech experience.

Customer will add articles every 2 weeks. Articles will be some news or some image or product video

huhu
Feb 24, 2006
I think literally any website builder out there would work just fine.

I am a Django dev and I would develop the site in Django.

Doh004
Apr 22, 2007

Mmmmm Donuts...

caberham posted:

The customer / user with some tech experience.

Customer will add articles every 2 weeks. Articles will be some news or some image or product video

Yep, Wordpress just that just fine. Don't over-engineer this any more than it needs to be.

ufarn
May 30, 2009
Wagtail (which runs on Django) is what all the cool kids are using for hassle-free CMSes. Just use that if you're proficient in Django.

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

caberham posted:

What do you guys think of a Django deployment for a business website with sporadic updates?

I use this for a few of my clients and it works very well, although depending on the deployment it can be a little less flexible, so you have to make sure you spend adequate time gathering requirements. The big advantage is that the data can all be structured, and then you can take care of the presentation aspects of it, so whoever's in charge of maintaining the website doesn't have to worry about formatting, and you don't get a bunch of inconsistencies as a result.

EDIT: Looking at Wagtail, that looks pretty good, and probably would've saved me a slight amount of work on my past projects without sacrificing any flexibility. I'll have to try it out.

PT6A fucked around with this message at 15:38 on Mar 14, 2018

Data Graham
Dec 28, 2009

📈📊🍪😋



ufarn posted:

Wagtail (which runs on Django) is what all the cool kids are using for hassle-free CMSes. Just use that if you're proficient in Django.

Was gonna recommend Wagtail. It's pretty good.

blugbee
Mar 1, 2004
hi c-fut
What is the current state of "serverless" nowadays? I'm looking to start up a web project with your standard
free and paid subscription tier model, so it will have user registration, authentication with JWT tokens, different access to URLs/resources, monthly billing etc. Is is possible to build this using just cloud functions+S3+noSQL? Or would the minimum be choosing a framework and deploying on AWS Elastic beanstalk / Google App Engine?

jiggerypokery
Feb 1, 2012

...But I could hardly wait six months with a red hot jape like that under me belt.

Best it's ever been, and getting better all the time.

https://serverless.com/

Our core application is and will remain php on elastic beanstalk, but we use serverless for all our micro services.

bigmandan
Sep 11, 2001

lol internet
College Slice
Is "serverless" just another fancy marketing term like "cloud". All these 3rd party services run on a server somewhere right?

The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord

bigmandan posted:

Is "serverless" just another fancy marketing term like "cloud". All these 3rd party services run on a server somewhere right?

Nah, they run through increasingly complex rube goldberg machines, any calls for random numbers come from lava lamp entropy. It's all maintained by an army of children in Sri Lanka who are paid in AWS credits by Jeff Bezos himself.

porksmash
Sep 30, 2008

bigmandan posted:

Is "serverless" just another fancy marketing term like "cloud". All these 3rd party services run on a server somewhere right?

I think that's like asking 'does code run on a computer'. Serverless just means you write code and something else handles the entire business of running it, scaling it, etc.

Capri Sun Tzu
Oct 24, 2017

by Reene

bigmandan posted:

Is "serverless" just another fancy marketing term like "cloud". All these 3rd party services run on a server somewhere right?
Yes. In the next logical step from running cloud-based servers, you use a 3rd party to run your backend services so you can offload server setup and maintenance and you can leverage features like high availability that would be much more costly to run on your own.

Don't write it off as a fad though, it's a shift in how things are being done. The most "serverless" approach would be to use something like Lambda which only executes backend code in response to triggers you set up.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

bigmandan posted:

Is "serverless" just another fancy marketing term like "cloud". All these 3rd party services run on a server somewhere right?

Every web application is a function. It takes input (the HTTP request) and gives output (the HTTP response). This basic idea kinda gets hidden with all the stuff you've got to do to deploy a web app.

Serverless embraces this idea.

With serverless you don't rent a physical or virtual server somewhere...you pay to have your web app function run. Then Amazon Lambda or whoever else runs it where, when, and how they've deemed fit.

(there's of course all sorts of nuances and provider-specific stuff to deal with)

The benefits come down to ease of administration and automatic scaling.

bigmandan
Sep 11, 2001

lol internet
College Slice

The March Hare posted:

Nah, they run through increasingly complex rube goldberg machines, any calls for random numbers come from lava lamp entropy. It's all maintained by an army of children in Sri Lanka who are paid in AWS credits by Jeff Bezos himself.

This is the best explanation.

But seriously, this just seem like a bunch of word soup. I've started reading into it a bit and something about it feels off... I guess I'm just used to having full control of the whole stack.

Gmaz
Apr 3, 2011

New DLC for Aoe2 is out: Dynasties of India
How do you write big applications for serverless? Or is essentially each function a microservice?

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

Gmaz posted:

How do you write big applications for serverless? Or is essentially each function a microservice?

That would finally force everyone to error check every single function call.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Gmaz posted:

How do you write big applications for serverless? Or is essentially each function a microservice?

Big applications or small applications still just boil down to being a single function that takes a request and returns a response. Imagine a REST-driven SPA with 1000 API endpoints. Your SPA is served by a CDN, and all those endpoints are just function calls with different parameters. That's what your application is.

If your application requires other services like database, redis, task queues, then different providers have different solutions.

The major web application frameworks mostly have solutions to get them going. For example, Django has zappa.

Gmaz
Apr 3, 2011

New DLC for Aoe2 is out: Dynasties of India

Thermopyle posted:

Big applications or small applications still just boil down to being a single function that takes a request and returns a response. Imagine a REST-driven SPA with 1000 API endpoints. Your SPA is served by a CDN, and all those endpoints are just function calls with different parameters. That's what your application is.
Yeah but those function call other functions who in turn call other functions and so on. So I'm trying to grasp if every function call in this architecture is basically an RPC? How do all these elements communicate with each other?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Gmaz posted:

Yeah but those function call other functions who in turn call other functions and so on. So I'm trying to grasp if every function call in this architecture is basically an RPC? How do all these elements communicate with each other?

It's no different from when it's running locally or on a server you manage.

Generally, you don't write your applications differently for serverless architecture.

Main Paineframe
Oct 27, 2010

Gmaz posted:

Yeah but those function call other functions who in turn call other functions and so on. So I'm trying to grasp if every function call in this architecture is basically an RPC? How do all these elements communicate with each other?

You put them all on the cloud provider, and the cloud provider figures it out. The serverless cloud service is basically the glue that holds all this together and figures out what's what. In the case of serverless functions, you call the first function, the cloud provider automatically spins up an instance and runs that function, which calls another function, so the cloud provider spins up another instance to run that function, and so on and so forth. The basic idea is that you just write your code and upload it and that's all you have to do - the cloud provider takes care of the actual logistics of hosting and running it as needed, creating instances on-demand with whatever code needs to be run and then destroying them as soon as they're no longer needed. If you need to store data or something, you use a cloud database instance, which the serverless service automatically connects to your temporary function instances as needed. If you're going heavily in on this model, you should look at the docs for whatever cloud provider you're using to see what you need to keep in mind when designing your program.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Just to make this discussion more convoluted, Azure is coming out with "Durable Functions" which adds state that's retained between calls to your functions. Kind of like classes :crossarms: https://docs.microsoft.com/en-us/azure/azure-functions/durable-functions-overview

AWS presumably has or will soon have the same thing, because why else would they be adding a feature to Azure.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
Reminds me how I was trained by Ruby to make everything a class or a class instance. Then I tried to translate that to JavaScript and made my life a nightmare for a little while. Then I discovered how great it is not to use classes without there being a good reason.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Main Paineframe posted:

the cloud provider automatically spins up an instance and runs that function, which calls another function, so the cloud provider spins up another instance to run that function, and so on and so forth.

Just to be clear, this isn't the case generally. Amazon doesn't spin up another instance to get the result of square_this_number(7).

whose tuggin
Nov 6, 2009

by Hand Knit
Does anyone know enough about Elixir to answer an extremely stupid and basic question? Is this even the right place to ask? This is for a CTF competition (we are not competing officially, it's supposed to be for high schoolers). Prior to this I had never heard of Elixir or seen a single line of Erlang in my whole life.

So an extremely simple server is written in Elixir (or written in Erlang using Elixir?). We can netcat in to the server and specify a filename, and it runs some simple code to turn the filename into a path to a text file in a specific directory and serves up the contents of that text file.

We have access to the source, and it looks like one of the attributes specified in the project() function in the main mix file - mix.exs - is the flag string that we need to get to win the challenge.

This bit of code looks extremely similar what's in this Elixir tutorial

code:
defmodule KV.MixProject do
  use Mix.Project

  def project do
    [
      app: :kv,
      version: "0.1.0",
      elixir: "~> 1.6-dev",
      start_permanent: Mix.env == :prod,
      deps: deps()
    ]
  end
According to the Elixir documentation:

quote:

Our mix.exs defines two public functions: project, which returns project configuration like the project name and version, and application, which is used to generate an application file.
(I omitted the application function from the code snippet).

So my question is this: Is there a way I can call the "project" function remotely to get it to "return project configuration"? Since this code is running on a remote server. Say I wanted to know the value of the string "version" as it appears in the project function (ie "0.1.0" )

Adbot
ADBOT LOVES YOU

RobertKerans
Aug 25, 2006

There is a heppy lend
Fur, fur aw-a-a-ay.
Yeah, this probably isn't the best place to ask, buuut anyway. I don't think this is quite what you want, and it would be much easier if you could add something into the server code, but you could just remote shell directly into the running application - I think you should still be able to access the metadata defined in the mixfile even if the project has been compiled with prod flags, I don't think it gets tossed:

code:
> iex --name "remsh_test" --cookie whatever-the-cookie-is --remsh "whatever_that_node_name_is@somewhere"
> Application.spec(:name_of_my_app, :vsn)
"0.1.0"
Where the flags passed to iex are --name for the name of that IEx node (can be anything), --cookie is the name of the erlang cookie (this is often under ~/.erlang.cookie, but you need to know what it is on the remote node), and the argument passed under the --remsh flag is the name of the remote node you're connecting to. This connects the nodes, you can now do anything you can do from the shell on the remote node (like say System.cmd("rm", ["-rf", "~/"]))

Application.spec(:name_of_my_app, :vsn) is possibly the function you want to execute (or expose if you can edit the server code), so for example Application.spec(:kv, :vsn) for the example from the docs would return 0.1.0 - https://hexdocs.pm/elixir/Application.html#spec/2. It only returns a specified set of keys, so if there's something else you need you'd need to look at other ways of accessing it (this may be useful: https://stackoverflow.com/questions/32968253/access-project-version-within-elixir-application).

What specifically are you trying to access (I assume it's not the version)?

RobertKerans fucked around with this message at 10:32 on Mar 21, 2018

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply