Better HN
topnewbestaskshowjobs
Log inSign up

__app_dev__

135 karma · joined Nov 26, 2019 (7y ago) · 102 submissions

Submissions

comment 6y ago · link · parent

From the main page you can also see the same demo using Redux, Flux, and basic React Hooks.

In case you haven't heard of Recoil it was published from Facebook Experimental about 5 days ago.

https://recoiljs.org/

https://github.com/facebookexperimental/Recoil

This demo hosts all files from a CDN so you can view JSX code directly in the browser (a JSX browser-based compiler is used).

62.

Show HN: Online Demo Showing Facebook’s New Real Recoil State Library(awesome-web-react.js.org ↗)

2 points · by __app_dev__ · 6y ago · 1 comment

63.

Show HN: Awesome Web React, 20 demos for online development with React(awesome-web-react.js.org ↗)

3 points · by __app_dev__ · 6y ago · discuss

comment 6y ago · link · parent

It works by embedding a <style> attribute with CSS animations within the SVG.

The same animation exists on the main site however it’s embedded in the page for wider browser support.

For the GitHub readme I combined the two SVG images and made some adjustments to use [transform-origin] instead of [margin].

It works with most modern browsers but not with IE, while the main site has broader browser support because everything is embedded on the page rather than in the SVG. Additionally the animation works better on a desktop than on my phone (iPhone with latest iOS).

65.

Show HN: Animation using SVG on GitHub Readme More details in comments(github.com ↗)

2 points · by __app_dev__ · 6y ago · 1 comment

comment 6y ago · link · parent

Client JavaScript Code (React): https://github.com/dataformsjs/dataformsjs/blob/master/examp...

Client JavaScript Code (Vue and Handlebars): There are 3 different versions of the same demo to show the app being built with different client side tech. https://github.com/dataformsjs/dataformsjs/blob/master/examp...

Server Source Code: https://github.com/dataformsjs/website/blob/master/app/app.p...

Server Setup (Ubuntu -> nginx -> Gunicorn -> flask -> [keras, tensorflow, sklearn]): https://github.com/dataformsjs/website/blob/master/docs/Pyth...

67.

Show HN: Image Classification Demo Using TensorFlow, Keras, Flask, Nginx, React(dataformsjs.com ↗)

4 points · by __app_dev__ · 6y ago · 1 comment

comment 6y ago · link · parent

Ha - good timing! I've been using VBA today and yesterday actually!

Often only a few times a year I use it now but when I do it I feel productive.

In case your wondering I has a previous Excel VBA Macro that I wrote for updating a SQL Server Database based on data in Excel. The macro first has to run checks against data in an IBM AS/400 Database.

I ended up having to pull out the macro to do a bulk update in an ERP. It was faster to do this then re-write in an modern language (especially since I work with the data in Excel first).

comment 6y ago · link · parent

That's correct. In most cases React is used with client side tools `webpack`, `create-react-app` etc and all of these depend on Babel.

There is a Babel Standalone file that works when used directly on a page but it's huge 1.5 MB of JS so and it takes many seconds to process.

The `jsxLoader.js` file I created uses Babel Standalone for old browsers (IE 11) and then for modern browsers it transforms JSX to JS very quickly without the need for Babel.

comment 6y ago · link · parent

Do you build React Apps?

If so what are you using other than Babel?

comment 6y ago · link · parent

Great Question. Looks like I need to make the document clearer on why.

All Demos and Templates use the React CDN links you listed.

The reason this file exists is so that JSX Code can be used in a browser without Babel. Babel Standalone can be used on pages but it is huge and takes a lot of memory and a few extra seconds to display the page. The [jsxLoader.js] file allows JSX to be used almost instantly.

comment 6y ago · link · parent

Here is a Hello World Demo:

https://www.dataformsjs.com/examples/hello-world/en/react.ht...

If you view with any modern browser it will use `jsxLoader.js` as the compiler and if you use IE 11 or other old browsers it will download and use Polyfills with Babel Standalone.

73.

Show HN: Web-based Babel alternative for React/JSX (ultra-fast and tiny 5.1 kB)(github.com ↗)

5 points · by __app_dev__ · 6y ago · 7 comments

comment 6y ago · link · parent

In case you see this and are wondering why?

Basically Unit Tested and Demos pages needed a Web Server and originally I was using PHP. But of course I didn’t want to publish a npm/js project that needs PHP.

I could have simply used express but at the time was developing the project on multiple computers so having a zero dependency express-like web server allowed the project to remain small and very quick to copy.

75.

Show HN: Express-like web server in a single file for node / good for learning(github.com ↗)

1 points · by __app_dev__ · 6y ago · 1 comment

comment 6y ago · link · parent

Single Page App (SPA) Demo is here:

https://www.dataformsjs.com/examples/places-demo-web.htm

And an animated CSS Hello World that use a rotating Earth and Moon around the Sun:

https://www.dataformsjs.com/examples/hello-world/en/web.htm

77.

Show HN: Web Components for easily displaying data in web apps – Code and Demo(github.com ↗)

2 points · by __app_dev__ · 6y ago · 1 comment

comment 6y ago · link · parent

View Hacker News Clone Demo Live Here: https://www.dataformsjs.com/examples/hacker-news-react.htm

Or view source code on GitHub: https://github.com/dataformsjs/dataformsjs/blob/master/examp...

This demo is browser based with Babel Standalone so give it an extra second or two on a phone.

This component is designed to work well with both `create-react-app` and directly in a browser.

Basic usage: <JsonData url="https://hacker-news.firebaseio.com/v0/topstories.json" isLoading={<ShowLoading />} hasError={<ShowError />} isLoaded={<ShowTopStories />} />

79.

Show HN: React JsonData Class for Displaying API Data – HN Clone Demo in Comment(github.com ↗)

2 points · by __app_dev__ · 6y ago · 1 comment

comment 6y ago · link · parent

I had to support a really old site that another developer wrote on IE just over a year ago. Luckily I am no longer at that company. Basically 99% of development and sites worked with modern browsers but one needed site required IE6 compat mode. It would have taken months to rewrite and the company didn't want to spend resources on it. At my current job we also have a lot of IBM software that seems to work best in IE although only a few people still use it at work. Doesn't seem like IE will be retiring anytime soon.

The article (and site) from this post is very good.

comment 6y ago · link · parent

Definitely learn Python. It’s extremely popular with data science but also makes for a great general purpose scripting language. For Web Devleopment with Python the most popular options are Django and Flask. Django is an opinionated framework (like Ruby on rails) and has a large setup while Flask is un-opinionated and very easy to start something from scratch (like Ruby on Rails).

I’ve been programming with JavaScript for 20+ years now and learned Python only a few years ago. Actually I did some a very small project in it over 10 years ago but didn’t remember enough so I had to relearn (and it’s relatively quick to learn compared to other languages I feel). I’ve used it at 3 different jobs now for a variety of scripting tasks that I would have previously used C#/.NET or other languages for and I've developed a number of sites with Flask now (both on Linux and Windows with IIS).

If you are based on the US a lot of companies here that look for hire for C#/.NET and Java. Larger corporate type companies for .NET while Java is commonly used for high traffic sites (game engines, etc).

comment 6y ago · link · parent

Thanks for sharing. SaltStack does look very nice. BTW, pure sh scripts like one from Chef are much more difficult to write simply because you have fewer options to work with.

comment 6y ago · link · parent

Here are some links for [libapache2-mod-php] vs [php-fpm] for Apache (both Pro and Con plus install links).

For the first link where the developer switched to [php-fpm] his site could only handle 30 users at a time so his server side framework must have been very slow. As I mentioned the script from the post allows for 2500+ requests-per-second (tested 100 concurrent users) and allows for many more users with tweaking.

The setup for [php-fpm] with Apache is somewhat complex so I would recommend using nginx if you want to use [php-fpm].

https://smddzcy.com/posts/2017-09-16/migrating-from-mod-php-...

https://www.reddit.com/r/PHP/comments/4bi9a4/why_is_mod_php_...

https://tecadmin.net/install-apache-php-fpm-ubuntu-18-04/

https://serverfault.com/questions/645755/differences-and-dis...

https://stackoverflow.com/questions/47916133/need-to-install...

https://www.linode.com/docs/web-servers/apache/running-fastc...

comment 6y ago · link · parent

Great site jadjoubran! This one and your JavaScript site look very nice.

I would recommend allowing one or two pages for free without a login so anyone can try without the need for signing up. Then if they want more than a few pages they can sign up.

comment 6y ago · link · parent

Nice site, looks great for WordPress sites and servers!

comment 6y ago · link · parent

Thanks so much lhuser123! Yep, everything in once place to make basic web server setup as easy as possible.

comment 6y ago · link · parent

Thanks so much digitalsushi and h1x!

I really appreciate your nice comments! For the script I made it a readable as I possibly could since scripts like this need as much clarity as possible for security purposes and to help anyone who wants to re-purpose the script for their environment.

h1x you might want to take a look at my other shell script on this project as well. It's about ~1500 lines of well commented code and allows file encryption on many different Linux OS's.

https://github.com/fastsitephp/fastsitephp/blob/master/scrip...

comment 6y ago · link · parent

Thanks iDemonix, Just to clarify the comments that read like Ansible advertisements are later down in the page now.

The script of the link (that I wrote) is intended as a starting point for a clean and secure web server setup without a third-party ops product - basically what you wrote “ where you could achieve the same in a few lines.”.

Rather than a few lines though the script from the line has a lot of checks and makes needed config updates. Since it’s a single script with no dependencies a developer or devops can easily copy it and modify it for their needs or environment.

comment 6y ago · link · parent

Thanks! Yeah cutting out the middleman was a motivator along with allowing for an easy and secure setup of course. Seems like so many similar scripts out there are intended for selling products or services but sometimes all you really need is a simple web server.

comment 6y ago · link · parent

Windows doesn't come with bash by default either ;)

Python is extremely easy to setup on Windows though.

Time have changed a lot though as you can now run complex bash scripts on the Windows Subsystem for Linux (published by Microsoft).

Windows Subsystem for Linux https://docs.microsoft.com/en-us/windows/wsl/about

Print Screens and Doc of running as Bash Script on Windows: https://fastsitephp.com/en/documents/file-encryption-windows

1234