How do database driven blog-style websites work? [closed] - database

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Before I start: I know this is a very broad question, but it is the best way I could phrase it, I have searched around a lot and can only seem to find generic explanations. I searched SO and didn't find much. I have also skimmed through some pages in the wordpress codex, and didn't find anything really useful.
I would like to create a simple database driven blog-style website, it will really only consist of stories (their title, date, content, etc), I just began teaching myself web development and my idea of how database driven websites work has proven to be completely wrong. I figured you would always need a file connecting to the database for each article, but the more I read I learn about mark up being generated on request, and so on, so the actual /year/month/day/article doesn't actually have to exist on the server, or that may be wrong, that is why I am here.
As I said I cannot find much on this topic that isn't a generic graphic of a server interacting with a web page. How does one go about creating a database driven website of this style? Are the files/directories not actually on the server but only created on a case by case basis as someone requests it? If so, then why can you type out a complete url and it be there with out throwing a 404? I have a lot of questions, really all I need is a strong explanation of how these sites work, code examples, and so on. Could someone explain how they work or point me to information (recommended articles, examples or books)?
EDIT: Please don't recommend a framework, I want to understand how these sites work and build one myself.

It's actually quite simple. Wordpress's index page calls wp-blog-header.php. That file calls for other files, and those files call for other files. It goes on for some time until all the contents of the page are actually loaded.
The databases come in when you start thinking about having users. Obviously the user information is stored in the database. Beyond that, Wordpress keeps post titles, dates, and other information in the database for easy loading later on.
Comments are also stored in the database. Each comment is associated with a number, and in the database, just like the posts, the dates/times as well as the usernames associated with the comments are kept.
Further exploration in the actual Wordpress files will reveal a lot of interesting features.

You might want to check out Django. It is an open source Python web framework that provides a lot of the functionality you are talking about. It also has a lot of very good high-level documentation with even a free e-book. It is centered a bit more on newspaper type sites than blogging, but most of the same principles apply. If you are new to python and like to use IDEs I would recommend checking out PyCharm. It has tight Django integration and makes for simple project setup and debugging.

Generally speaking, you'll use a framework that will take input parameters (year/month/day/article), run some code to fetch data from the database, and dynamically create the webpage. There isn't an actual .html file sitting on the webserver. One of the most popular frameworks to do websites like you're describing is Ruby on Rails, which makes it incredibly simple to do.

Related

Creating custom order system [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
The question i have is many fold.
So I work IT for this company. It’s a small company. Very small. They have an ancient ordering system that uses MSACCESS and was built in Visual Basic. I’ve been tasked with developing a new ordering system that processes orders as well as take in orders online.
I’ve created an order form in Excel with all the proper calculations that need to be made as sort of a foundation. I’ve found a service called SpreadsheetConverter that converts it to HTML or if I’d like Node.JS. But to be completely honest I have no idea what to do with Node.JS. I have some knowledge of VB and i’m (sort of) starting to understand databases.
My question is where would the best place to start if I wanted to build an application that can take in orders, store/retrieve customer data (autofill?), store order information into a database so i can retrieve them. The order system has to customly tailored to this company, they make Doors, so the calculations deal a lot with sizes and styles.
I have all the calculations i need. Basically where should i start if I want to build a UI, write simple code, and have it interact with a database. I’ve checked out Xojo, I have a Mac so i cant use Visual Basic. Where should i look to start a database?
Or is it possible to connect the Node.JS that spreadsheetconverter creates and connect it to something like Firebase?
I’m sorry if this all seems confusing, I basically don’t know where to start and a push in the right direction is all i need so i can narrow my focus.
Xojo might indeed be a good start for this.
Xojo includes access to a sqlite database, and you can add new records rather easily. You do need to know how to design and query an SQL db, though.
The biggest question is probably how to implement the user interface. This will be the biggest task. With Xojo, you can design it fairly easily, using its window layout editor.
Then you can either develop a monolithic desktop app, i.a. a Mac or Windows app that runs and maintains its database all on the same, single, computer. Or, if you want to allow multiple users access the database from different computers, consider writing a Web application in Xojo, which will be used through a web browser then. Most code will be the same, but testing will be a bit more complex and slower for a Web app, probably.
You would have to re-implement all your calculations in Xojo, though, as Xojo has no way to use or import Excel sheets this way.
Also, have a look at FileMaker. I have never used it but it may fit your needs.

How to insert coding and Maths formula into database

I am working on a project which contains the question with options and solution of that question. I want to display the Mats equations and some coding questions on webpage. So my query is what will the the procedure to insert those equation into Database and display it on my webpage.
for the reference I want to display like this following link :
http://www.indiabix.com/aptitude/compound-interest/
http://www.indiabix.com/c-programming/functions/
Thanks
Frankly speaking as far as I understood your problem you do not have Idea about coding (I may be wrong but as you are not suggesting any particular database and any technical stuff I'm assuming this.)
You can use prebuilt frameworks for this job you don't need to design application from scratch unless it is your some project.
Some suggested Links are this ...
Moodle
WordPress
You need to find plugin after installing these frameworks on your webserver bundle
For that you can use
WAMP on windows or LAMP if on Linux
But Again your question too general. Give some inputs first
Information About Moodle:
IF you go throught moodle webiste you will get to know that how powerful LMS( learning management system ).
You just need to know how to configure such websites
Go through this video tutorials if you want to
Infromation About WordPress:
Wordpress is general purpose Website so you can develop any service with it very easily and everything including database is taken care by it (same case with moodle but moodle is more focused on LMS )
You have to search for LMS plugin inside wordpress for your purpose.
KINDLY ACCEPT THIS ONE AS ANsWER if you find information usefule... (Points help me contribute more and allows me also to ask question)

How to Prevent from re-uploading a file? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
i have an Educational website and i create always pdf files from my learning and ad them for download
but there is many learchers that download my files and reupload them somewhere else
i used google dmca but is there any way to Prevent from re-uploading my files?
One way is to use your .htaccess to prevent hotlinking, but even if you do that, you'll again have the problem that when someone views the document via an in-browser extension (e.g. Adobe Reader, Foxit PDF Reader), they can save it and you've lost control over what they can do with it. Or, depending on how you've set up your site, they can simply directly download it, leaving you again back at square one.
Hence, the solution is to bypass direct access to the document. And, there are a number of ways to do that, which varies based on technique and web software (platform) used.
However, since you didn't mention a particular platform or technology: you can use web controllers (MVC type controllers) to broker the dynamic viewing and displaying of the documents in tandem with a client-side tool / plugin to do the displaying for you (much like Scribd).
However, Scribd uses a proprietary Flash PDF viewer called iPaper, and while it isn't available for use, you can find many other alternatives on the web. One that comes highly recommended (there's even a tag on SO for it) is FlexPaper, an open source plugin that implements a client-side web-based PDF viewer - which I think will suit your needs perfectly (from here):
This project provides a light weight document viewer component
enabling PDF files to be viewed without having any PDF reader software
installed. This project provides both Flex library and stand-alone web
version.
Here are some demos of it in action:
http://flexpaper.devaldi.com/demo/
Sorry, by mistake posted partial comment. Anyway...
Why do you afraid of reuploading of your files ? Put links to original site into the PDF and get profit of this. More copies, more downloads, more popularity for your resource. If you indeed would like to make PDFs available from your site only, you have to hide files from users and provide some functionality to read them from your web site only (you can use existing sites of this type). That makes duplicating of your resources to be harder task, but be ready that many users reject to read it this way.

MS SQL and my need for a little direction [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I've been lurking around for several weeks and have been totally blown away by the amount of information and how the community quickly responds. I have noticed that questions like this typically receive sarcastic remarks and sometimes get down voted. Please bear with me as I attempt my first post :)
I little background..
I work at a tiny software company as the "QA department". Our application has a MS SQL back to store customer data and short term loan information for financial service companies. I started working here 6 years ago as a gernal technician to provide support for their call center, so I've been overly exposed to SQL and have become fairly familiar with working with it. You probably wouldn't pay me to develop a enterprise level database, but at this point I've become familiar enough to do most things in SQL.
Why I'm asking my question..
I want to develop an application to store and track our software issues and new dev. I've done research on this website along with asking around and I still feel sort of lost as to which direction I should take. I want the core of the application to be pretty basic at first, to provide various screens between my entities/modules and to create reports to show their various relationships. In the future I want it to be more complex, to provide a web portal of some sort and to start getting into various complex QA software concepts. I've read around and it sounds like I might want some variation of C/VB for the windows portion, but all of the topics have sort of overwhelmed me. Do I want to start with a more basic one that was created 20 or 30 years ago? (I think that's C and C++, right?) or a more recent one like C#? Will I be able to develop a web portal with both of these? (by web portal I'm thinking it would provide access to our database of defects and have username/password sign-in). I've seen that the various .NET languages lean more towards web development, should I start with one of these?
I am at the very beginning of this and I fully understand that I'm jumping into some deep waters here. I want to make sure I don't end up spinning my wheels and that I focus my energy on something that won't end up being a bad idea in 1 or 2 years after I start. So far I've found this website very helpful, if I can pick a direction I know I won't have any problems finding what the next step is. It might help to know that I have no formal or informal programming background (if it wasn't obvious). I'm a 27yo techie who is starting his first venture into programming, go easy on me! Thanks for taking the time to read this :)
I won't recommend that you go to C, C++, or VB. C and C++ are used mainly for developement of system software, compilers, etc. VB is deprecated by now; there is a .net version VB.NET, but my preference is C#.
Looks like you are a Microsoft shop. Steer youself towards using C#. Visual Studio provides great support for development of Web Applications with support for holding state in entities backed by MS SQL.
I would start with a simple example as given in MSDN http://msdn.microsoft.com/en-us/library/dd410597.aspx.
This example uses an Model View Controller based framework that is fairly easy to configure and use. They have great examples.
There is a free framework that also supports MS SQL Entity store http://www.coderun.com/ide/
Enjoy
Don't write a line of code. There are literally hundreds of open source and commercial software packages that already do what you want to do. You'd be better of spending time researching them and finding the package that most closely meets your requirements. A good solution will also be extensible enough that you'll be able to modify it to meet all of your requirements.
Since you work for a small company I can guarantee you that using your limited development hours "writing your own" will be counterproductive. You'd be better off adopting something off the shelf and becoming proficient at it. You'll learn more about developing systems like this once you've become intimately familiar with one of them.
Check out JIRA or
http://en.wikipedia.org/wiki/Comparison_of_issue_tracking_systems for some other ideas.
For the benefit of your company I would recommend to use an existing
solution. But if you want to learn and build something of your own, I
would suggest that you check out some popular web application
frameworks, like:
Django
Ruby On Rails
Zend
Good Luck with your project!
Given that your intent is to learn and create something yourself I think you should consider a LAMP stack and PHP with one of the PHP frameworks on top (Cake PHP, code-igniter or the like).
The C++ route is a long hard way (C++ is my language of choice) to learn; as a learning experience I think you will get quicker and more satisfying results with PHP.
I also think that this is a realistic project for someone of your skills over a period of a 6 to 12 months - start with a simple requirement and then build it up to have all the features you need.
If you just want a bug tracking system obviously there are many options that won't demand any development.
How much experience do you have with things like installing Linux, Apache, Mysql, etc? If you are completely new to this, then this will be a much tougher task, because there are many layers you'll have to learn before you can even get to the point of writing an end-to-end application.
I would avoid C/C++/C# because there are a lot of things you would need to learn about basic programming before you even got to the stage where you could make database calls.
On the assumption that you don't have experience with LAMP (Linux/Apache/Mysql/(Perl/Python/PHP)), my suggestion would be to start simply, by using a scripting language like Python or Perl. You can very easily get a database connection, and start writing queries, and extracting data from there. If you are used to Windows, I would install ActivePerl or ActivePython, and start from there. You can start building a command line program that does what you want, and then from there, you can move on to creating a web application that can do something similar.
Building a web application would likely be much easier than writing a Windows application, so after you have gotten comfortable with the scripting language, that's the direction I would go afterwards.
Good luck!

Free forum software with a good spam protection [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
About a week ago I had to pull the plug on my PhpBB forums because spam had reached totally unmanageable levels:
The database contained well over 300,000 spam topics & messages, for a total of 8 Gb of junk. None of it was displayed on the website, as the forum was on a strict moderation queue, so there was no point to it, but the volume was such that moderation was plain impossible.
Now, I am considering my options for a new forum.
My requirements are:
PHP or easy to install on a typical
LAMP hosting Free Really good spam protection.
Easy to customize & integrate in my website
Reasonably stable & fast
Easy to manage
PhpBB was good, but the SPAM problem was so bad that the forum never had a chance to really get anywhere.
I have been looking around at similar questions, but there are very little info regarding the quality of their anti-spam features.
I have added reCAPTCHA to a phpBB forum for user registration and additionally run reCAPTCHA plus a very simple blacklist filter handwritten into the phpBB code on posting attempts from unregistered users, and the spam levels are minimal.
Have you tried punbb? It has good spam and xss protection.
There are a lot of tools to stop spam in and around PhpBB.
Require registration to post
Require email validation to register
Use a CAPTCHA on the registration form
Use Akismet to filter posts coming through (there are a lot of other mods than the one I linked to).
Use moderate-first-post (can't remember if it's built in or an add-on)
But if you're looking for something faster and perhaps a little simpler, PunBB is popular and a fork of it, FluxBB is growing in popularity (since the PunBB brand was bought by "the man").
They are a lot faster and lighter on resources but you do trade in quite a lot of community resources, plugins, and built-in features for that.
I implemented FluxBB in a client's site, as viewable here just to show you that it can be fairly tightly integrated into a site's design. In this case the main site is a Wordpress install.
Just noticed your comment on your opening post. I don't think there are any plug-ins, importers or anything really that will automatically cut down existing spam.
Most spam is very similar. Unless you've been targeted by multiple spammers, you might be able to write a little PHP script to look for known spam signatures and delete them (and their users) automatically.
This should get you back to a point where you can manually moderate quite quickly.

Resources