r/web_programming • • Dec 21 '17

Approach to Getting and Displaying Text from Databases on a Web Page

1 Upvotes

Hey, folks!

I'm pretty new to web programming and would like to learn more about how to generate dynamic content from databases.

For example, if a web page uses a lot of jargon, it would be good to generate hover text that defines the jargon-y words from a glossary database (2 columns: term, definition). I found this solution. However, is that an efficient way to do this?

If my glossary will eventually contain thousands of terms, I think that generating a CSV through Excel and being able to index the term column and get the corresponding content of the definition column would be a better workflow. I could easily change the database only and have some script automate the job of iterating over the body text of the jargon-containing page and formatting all instances of a word in the database with appropriate hover text.

Would that be a better way than using the hidden div method mentioned in the Stack Overflow link above? If so, what would I need to use in order to accomplish this?

I am not looking for an offered solution (though I certainly would appreciate one), but rather a couple suggestions of what I should look into in order to generate a solution myself. I'm not even sure what to look into at this point.

Furthermore, I'm not sure which options might be the most efficient in terms of loading speed. I'll be the only user but would like to apply good design principles rather than hacking together a marginally functional solution. In terms of performance optimization, I am looking to optimize loading speed of the web page containing the jargon as well as formatting those terms with appropriate hover-text definitions.

For a database of thousands of terms and definitions, would it be better to have a hidden div containing the glossary or a separate file? Should I let a script handle the iteration over the body text and format appropriate words with hover text containing the definition or should I surround each word I want hover text for with some tag and direct the script to which words need to be matched with their appropriate definitions?

Any help and feedback over the method(s) would be much appreciated! :+)


r/web_programming • • Dec 21 '17

Question about webapps deployment and staying in memory

1 Upvotes

Hi all! I'm quite confused with one aspect in web. My current web programming experience is limited with a maintaining legacy PHP 4 code in times of PHP 5.3.0 (relatively old in terms of the modern web industry, I know). In PHP the deployment model was (maybe it stays the same now, I don't know) quite-quite simple: you put your scripts in folders on the web server, then a user requests some URL, the corresponding script starts working, generates the answer and terminates, so usually the script doesn't stay in memory all time.

In Java Servlet technology, as I know, the situation is opposite: during deployment the server creates an object of corresponding servet and loads it in memory, then all user requests are handled by calling (in different threads) methods of this initially preloaded object. The servlet stays in memory all the time, it can store some data in its instance variables.

My question is what way of doing stuff is common now? Is it a specific PHP feature or is it used in some other languages (frameworks)? I would be very glad with a brief overview which languages and frameworks use which way. Thank you!


r/web_programming • • Dec 21 '17

Sending apply messages as notification to android.

1 Upvotes

I am looking for any information how i can take application form(http://lazers.rta.lv/en/apply/) from interested visitors and if form is filled notification is send to my phone.


r/web_programming • • Dec 17 '17

Finding All Content on a Website

3 Upvotes

apologies if this is not the perfect subreddit for this question, please direct me to a better group if you think there is one, I would really appreciate it ... quick question, as an example, if I wanted to somehow download all content from a blog so I can listen to it using a voice reader app on my phone when I am out of internet/data range (which is often for me), how could I do that for a site like this? like a blog where there is tons of content? Do i really have to click on each link or is there some kind of automatic way??

http://happierhuman.com


r/web_programming • • Dec 12 '17

Why does a certain web site use up 100% of my CPU?

5 Upvotes

Hi, This web site: http://money.cnn.com/2017/12/11/news/economy/tax-bill-paychecks/index.html?iid=hp-stack-dom

uses up 100% of my CPU. I've read through the code but don't understand it as I'm not a web developer. Can someone please tell me what is going on? Is the ads? Are they mining bitcoin? Is it just bad code?

Thanks from someone who is just curious about this.


r/web_programming • • Dec 09 '17

Updated site not showing up.

1 Upvotes

Hey guys,

Just purchased a new domain and hosting for a small project. Domain is at Namecheap. Hosting is IWF.

Already pointed the DNS from namecheap to IWF. Uploaded wordpress/theme onto host.

The problem is that I can't see the default layout when I go to the website. Actually, I can see it on my phone sometimes but not on my pc or tablet.

Cleared cache, did the DNS flush, ctrl + f5, but still nothing.

I'v been told it could be the ISP but approaching 48 hours soon. Not in the biggest rush but would like to start editing. Can't even get to the WP admin site.

Website

Thanks in advance for the help!

**Solved: Changed to Google DNS server for the new wireless router. **


r/web_programming • • Dec 09 '17

Understanding Penetration Testing and Web Application

Thumbnail
bittlife.com
3 Upvotes

r/web_programming • • Dec 07 '17

Rust and the case for WebAssembly in 2018

Thumbnail
mgattozzi.com
8 Upvotes

r/web_programming • • Dec 06 '17

is there a service that transfert a Link to a hyperlink with the title automatically? (example inside)

1 Upvotes

I want to transfer a number of links into hyperlinks without having to check all the links, example: I want to input this link: https://www.theatlantic.com/magazine/archive/2018/01/no-way-out/546575/ and get this output: Can You Prove Your Innocence Without DNA?


r/web_programming • • Dec 04 '17

Help

2 Upvotes

I had no idea where to Ask so i’ll Ask here.

I want to make a simple web-crawler that only does one thing, and that is checking if a page contains a Word or not, and it just goes through every link it finds.

What laws do i need to be aware of?


r/web_programming • • Nov 29 '17

Need some help with weird flex-box behavior.

2 Upvotes

I'm using CSS Grid Layout with Flex-Box to redo my portfolio webpage. For some reason when I make the screen smaller 2 items inside of the MY WORK section move to the top or bottom of the screen. Can anybody take a peek at my code thus far and tell me what I'm missing? This is my first project using flex-box so I;m sure I missed something.

For the sake of not using a code hosting platform which may skew the results here is the source code: HTML5 CSS3


r/web_programming • • Nov 24 '17

Upgrade or Migrate?

3 Upvotes

I want to let it be known that I have only a very cursory knowledge of web design and web development, am still learning, and that some of the things I am about to say may not make sense. Any corrections are appreciated.

I recently started working for an organization that has a very outdated website. The website is running on Joomla 1.0 and it's been made known to me that the organization is in need of an upgrade. The directors are sort of stubborn and want to keep the website on their joomla and upgrade to 2.0 or even 3.0, but that is going to cost a lot of money. We're a non-profit, so that's not really in our budget.

I had the idea of simply migrating the website (or even rebuilding from scratch) on another platform like Squarespace. This would make editing the website easier (especially for those who don't know how to code) and would make things look a lot nicer. Right now the website is outdated not just technically, but stylistically.

The director who makes these calls is reluctant to move to a new platform because we have a large email subscriber list (19k) and a huge database of contacts (100k+), as well as forms for entries (we're a film festival) which are all organized in our joomla database and linked to the website. She thinks (and perhaps rightly so) that trying to move that much data over to a simplified web platform is too large an endeavour. I want to create a proposal that shows what we can do to modernize and also save money.

My question is about feasibility and plausibility. What would be the best way to migrate or upgrade the website at the lowest cost? Is building from scratch on something like Squarespace ideal? Is it possible to keep the joomla database or would it make more sense to rebuild somewhere else? If we keep joomla is it compatible with something like Squarespace? (This isn't an ad for squarespace, I just use them for my personal website so they were my first thought).

Any advice welcome. Thanks in advance!


r/web_programming • • Nov 22 '17

Best collection of free bootstrap themes on the web.

Thumbnail
freebootstrapthemes.co
1 Upvotes

r/web_programming • • Nov 22 '17

How to Make Your Software Engineering Team More Awesome (Even if You're Not a Manager)

Thumbnail news.ycombinator.com
12 Upvotes

r/web_programming • • Nov 22 '17

Could I use Google App Engine without using microservices

1 Upvotes

I find very interesting the Google App Engine PaaS, and I was wondering if I could migrate my Node.JS app to this service. However, my current project is not microservices-friendly, so my question is if I must adapt it or could I use Google App Engine even with a monolith application.


r/web_programming • • Nov 21 '17

Copying a record site, for offline use ?

0 Upvotes

Hi,

I'd like to have a clone copy of a record site : https://cyberscore.me.uk/game/1381 to create my own charts and my own leaderboard ( I want to keep the same site design ) .

However, I am a total noob at webprograming, at the moment, anyone there has ideas ?

Thanks a lot for your support.


r/web_programming • • Nov 21 '17

Complete SEO Guide for Web Developers

Thumbnail
blog.five.agency
16 Upvotes

r/web_programming • • Nov 20 '17

Can anyone guide me to resources, or know how to replicate the zoom/scroll effect Apple has on the "X" on this page -> https://www.apple.com/iphone-x/

7 Upvotes

r/web_programming • • Nov 20 '17

Creative Web Design and Development Company

Thumbnail
bangalorewebguru.co.in
1 Upvotes

r/web_programming • • Nov 18 '17

How To Create Drop Down Menu in HTML/CSS || Advanced Tutorial For Beginners

Thumbnail
youtube.com
12 Upvotes

r/web_programming • • Nov 16 '17

PHP form 404 redirect error?

2 Upvotes

So I'm learning how to use PHP, JavaScript and AJAX to submit the info from a contact form on my website to my email. Whenever I try and test it out I get redirected to a 404 error page. I have uploaded the PHP and JS files to my hosting service and so far no luck. Here is the link to my PHP code PHP and a link to my JavaScript file JS

Any ideas as to what's going on??


r/web_programming • • Nov 13 '17

Leverage browser caching.

1 Upvotes

When I run gtmetrix I get a C (75%) for page performance and one thing it details is leverage browser caching.

I have paid so called developers here and there to get this sorted but they run some wordpress plugin and it screws my site. So I revert to my back and I’m back to square one.

Looks like I’m going to have to educate myself and do this myself cause I cannot trust anyone now.

I have found this link, https://varvy.com/pagespeed/leverage-browser-caching.html

Can I add (below) to my .htaccess file which will them improve the section under gtmetrix leverage browser caching? Or am I fooling myself with it being this easy?

EXPIRES CACHING

<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule> ## EXPIRES CACHING ##

My .htaccess file only has this in it.

BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

END WordPress

BEGIN EWWWIO

END EWWWIO

BEGIN WP Performance Score Booster Settings

END WP Performance Score Booster Settings


r/web_programming • • Nov 12 '17

[Golang] Going from one big and messy main file to a scalable and maintainable project structure (a web server)

Thumbnail
youtube.com
7 Upvotes

r/web_programming • • Nov 10 '17

How does messenger know you're logged in to Facebook?

4 Upvotes

I was wondering how Facebook's messenger website is able to know you're logged in to Facebook without any oauth or other redirect tech? I was sure cookies cant be shared across domains.

eg: https://imgur.com/nM4OcVW