database recommendation for an offline html cookbook - html

I am currently planning to transfer my cooking recipies from a word document into an offline webpage. I have a (very) basic understanding of html, css and javascript, but never really got in contact with a database.
Can you recommend any database that I can use for my project?
My requirements are:
ideally future-proof -> widespread usage, state of the art and exportable for future use
broad applicability (maybe useable in future projects), not just for cooking books
no php, since the page is offline a server should no be necessary
no need for a fancy user interface. I would prefer to just enter and change the data directly in the database, like entering text in excel. I do not want to use commands like "update" or "insert" to add data.
I read about Excel, MS-Access, mySQL, MariaDB, …
Can anyone recommend a database for my purpose? This would really help me out! I am lost in the jungle of opportunities.
Thank you in advance
Best regards
REn0
Edit: I uploaded an image to clarify my idea. Unfortunatly stackoverflow does not allow me to embed it into the post, thats why I only posted the link
https://i.stack.imgur.com/6nvx1.png

One of the tenets of Rails is you shouldn't really care what database you're using: that's all abstracted for you. I know it's kind of diverging from your skillset, but Rails would be a great approach for an application like this, especially if you want to deploy to a server instead of running it locally down the road.
Check out some 12 in 12 tutorials by Mackenzie Child, https://www.youtube.com/watch?v=QhdzE1yNs-0

Related

Newbie - How to display info from a .dat file?

I'm pretty new to this so I'm not sure if this is a simple request or not but here goes:
I am working on a school website and under each program page is a list of course codes. What I'm looking for is when I click on said course code (ex. HEL2106), to have a lightbox-type of popup that displays program info about said course code. What I have is a .dat file that has all the course codes and descriptions in it, so I would like to use some sort of HTML/CSS/JS that will pop this up and display the correct info about the clicked course from the .dat file.
I'm not 100% sure on how to go about this so if anyone has any suggestions at all, that would be really helpful.
If you need any other details from me, let me know.
Thanks,
(File Info* The .dat file is pretty much just a notepad document with each course code & description in sequence)
Just to let you know, you need to search and learn about a lot of things first.
For data access on a website, you need access to a database. If you don't know about SQL (or any other query language), Query, Database, Tables, Server ... then you should start there.
To read those databases, you need to write code (ASP.NET, PHP, etc) that runs on a web server (Apache, IIS, etc).
If you want to create a website, I recommend you start working with WordPress, Joomla or other CMS (Content Management System) for you to familiarize with a lot of things before jumping to the advance stuff.
YouTube is a very good friend and teacher! :) Start by looking some tutorials there. Hope this will guide you to what you need.
I have no idea what your level of experience is based off your question so I will assume you have a basic understanding of HTML,CSS and JS. If not, then I would recommend Exel Gamboa's answer.
It sounds like you're looking for something like http://fancybox.net/
Of course, it is typically used for displaying images but it could be easily modified for your purpose.
Now about your .dat file. When storing data for large websites, it's typically best to use SQL for databases. This allows you to access data and store it in an organized manner.
As a final recommendation I'd take a look at using a CMS for your website. (Wordpress, WolfCMS, perch, etc...)
Hope this helps.

How do I extend this Netbeans JSF2 CRUD example to have a single create and edit form for all entities?

I recently discovered this very useful Netbeans tutorial for creating a simple JSF 2 CRUD application http://netbeans.org/kb/docs/web/jsf20-crud.html. The final product has somewhat limited usability as one is confronted with a myriad of web pages. I would like an example of how to consolidate the Create and Edit forms (using the same project if possible). This seems more in keeping with how a person would actually enter such information and would reduce the risk of data entry mistakes. Why enter a client and their billing address on separate screens? One should be able to add or remove addresses, if need be, on the client's edit form. Or if a new client has multiple addresses, enter them all on the client's create form. The application just seemed incomplete with no further tips on how to improve it. If one has knows of a useful book that covers this, then I would gladly read that as well. Thanks.
I didn't realize the complexity of my problem and found that I couldn't get what I needed using JSF2 with the information resources available. Through my searches, I also found that many others were asking about Master-Detail CRUD applications, which I then learned was what I needed, but in slightly different ways and not getting any solid examples. A problem properly stated is half solved and I didn't know the problem statement. Armed with more knowledge, I was shocked to find that the answers were not readily available outside of some videos on YouTube showcasing Oracle ADF. In the end, I was able to quickly build the application I desired using the Play! Framework. In a way, by not having my question answered I was able to find a solution that would prove to be a better fit for my needs; though I would have gladly bought a cookbook if someone had pointed one out.

Best Practices for Setup and Management of an Open Source Project

Later this year I want to release a PHP framework that I've been working on as open source. I do use source control (SVN), but it's on an extremely limited basis. I'm self-taught, I develop by myself and don't have the experience of working with large teams. I have some ideas about what can help make a project successful, but I'm fuzzy on some of the details. Since it's not yet released, I want to do everything I can to set up the right infrastructure from the beginning. What do I need to know in order to setup and manage a successful project?
Some ideas that I have to make it successful (beyond marketing it):
Good documentation and tutorials
Automated unit tests and builds to
push update to the website
A clear roadmap
Bug Tracking integrated with the
source control
A style guide to keep the code
consistent
A forum for the community to get
support, share ideas, etc.
A good example application built with
the framework
A blog to keep the community informed
Maintaining backwards compatibility
wherever possible
Some of my questions:
How do I setup and automate a one
step submit-test-commit-generate API
docs-push update to website process? Edit: Would Ant or Maven be good candidates for this? If so, do you know of any resources for setting up a PHP project using them?
How do I handle (technically)
submissions from other users? How can
I ensure that those submissions must
be approved before being integrated?
What are some of the pitfalls that
can be avoided in terms of the
project community? I'd prefer to have
it be as friendly and helpful as
possible without a lot of drama.
I'd love to learn from your experience on any of these points. If you think I'm missing anything big, please share that as well. Any resources (preferably geared toward a beginner) that you could point me towards would also be greatly appreciated.
I'm just getting started in community projects, but I'll give you some advice on what I know.
How do I setup and automate a one step submit-test-commit-generate API docs-push update to website process?
I've never implemented it as one process. You could just have a checklist, and possibly even create some scripts to do certain tasks. I've never worked with any source control that automates the uploading and such to be done by a script. Most of the time, there is some web interaction to be involved.
You don't want to push API changes until it's an official release.
EDIT: Working Environment
For PHP, most of the time, I either edit directly on the server and test it there, using a beta.example.com, or similar, before pushing to example.com. You could also set up an web environment on your home PC (using XAMPP for Windows, or the standard LAMP installation on Linux). You would probably just use a mirror of your repository here, so you'd do svn commit, or whichever is appropriate for the VCS or DVCS you choose.
The fun part is testing this with different PHP versions. I've not done this myself, but you could probably use a .htaccess file to run a different PHP binary in order to test it out. I'm not really sure what the best option is for this is.
I've not done much with API, as I've never created a library, but just doing a quick search I found http://www.phpdoc.org/. It looks like a mature project, so that might be a starting point.
As far as creating releases go, I generally create a script that only includes the files that are part of the distribution (it will filter out any VCS files, and anything that you don't want in the distributed file). You could write a script around find on linux (which is what I do most of the time), or there may be other better options.
How do I handle (technically) submissions from other users? How can I ensure that those submissions must be approved before being integrated?
This is mostly handled by the bug tracker, and limited access in the Version Control System. Usually, you, and the people you allow, can commit to the VCS. Other users can submit patches, but then you might have someone review the patch, test the patch, and commit. You could split these tasks up as a team, or assign a patch to one person and have them do it all.
What are some of the pitfalls that can be avoided in terms of the project community? I'd prefer to have it be as friendly and helpful as possible without a lot of drama.
I would just make sure to keep it as positive as possible with the project members and community. There's going to be some disagreements, and it will drive a few people away, but as long as you have a stable product that meets the needs of most people, I think that's all that anyone can expect.
One minor suggestion that's worked well for me: start using first-person plural pronouns, rather than singular ones. That is, talk about "we" and "us" rather than "I" and "me." It encourages other people to participate when they feel like part of team, rather than when they feel like they're contributing your own self-aggrandizement.
The most important thing you have to do is to attract users. Without users, you won't get any contributions and developers helping you out. Because developers are users first, and then they decide to extend/fix something they use and might become contributors.
So to get users, you should consider
describe what your framework does in one or two sentences at the top of your project page
mention how your framework can be used and for what, what situations it is most useful for
add a lot of examples on how to use it
mention whether your framework is stable, beta or alpha. That's important because user need to know that before they start using it
also mention whether you want to keep improving it and keep working on it - most users don't want to use a framework that's abandoned (also keep in mind that a lot of users check your commits to see whether you really are working on it - if your last commit to the repository was months ago then you're not really working on it, so cheating isn't possible)
If you got all this, and people start submitting patches, you can use a patch tool to apply those to your source. Depending on your version control system, you can either use the GNU patch, a diff/patch tool that comes with your version control or maybe even a GUI tool that helps you with this. SVN doesn't have a patch tool (yet), but 'svn diff' will create a patchfile which you can then apply with the GNU patch tool, or in case you're using TortoiseSVN, right-drag the patchfile to your working copy and have TortoiseMerge apply it for you.
And on how to best deal with the community:
answer questions in time, don't wait more than two or three days to answer questions
try to be nice, even with upset and angry people. Only if they keep bothering tell them to (still in a nice way if possible) go elsewhere
always keep discussions about the project on a mailing list. You don't want to repeat the same discussions over and over again - if you have a mailing list, just point users to the archives before the discussion starts all over again
And you should watch the talk "How Open Source Projects Survive Poisonous People (And You Can Too)" - it's really good and tells you a lot on how to deal not just with 'poisonous people' but also how to deal with all people involved in your project.
I'd like to add that you should make it as easy as possible for your users to get the whole thing running and modify the code - these 'power users' can be 'converted' into developers or at least people who send smaller patches.
Don't try to do it all yourself - for open source projects there are several hosting providers that solve most of the problems. I recommend codeplex or google code.
Setting up build scripts will depend a certain amount on what platform you set up, but in general it's easy to add any tool you want into the script once you start using any sort of build script.
If you really need the one step process you describe, you need a build server. I use TeamCity, which I have set up to watch for any changes in svn and trigger build/test whenever something is checked in. The build server will generally be able to perform any steps that you put into the build script.
Read up on Git as an alternative to SVN
free public repository/bug tracker/wiki/fork-enabled community in Github (which hosts symfony and PHPUnit amongst others)
"How do I handle (technically) submissions from other users? How can I ensure that those submissions must be approved before being integrated?" - with Git, pull what you/your closest team finds most interesting to the master branch
Consistent API
be inspired of other public API:s
only change in major versions
guessable
Interesting for both users & developers
clear goal (your roadmap - excellent)
useful, contra everything else available
easy to use, but still not easy-enough-to-write/maintain-yourself
You could check out either Ant or Phing to build your project. Include CodeSniffer in the build and you'll save time checking for basic formatting errors/differences.
These are all technical tips, about the soft part... treat humans with respect, a lot of interest and be overly excited about their contributions and make them feel that they're not wasting their time. That would appeal to me.
Take a look at Karl Fogel's book on Producing Open Source Software. It probably has everything that you asked.
You should also plan for engaging the community. I'd recommend reading Jono Bacon's The Art of Community [http://www.artofcommunityonline.org/].
You have a great set of ideas to start. You might have to start by trimming them down! Ask yourself what's necessary for a first release.
For automating the builds and tests, the scripting can be done with ant, maven or phing for PHP projects.
You'll probably need a host so you can demo the product. For PHP that is pretty easy to find.
You need an open source hosting provider-- especially github (but also google code, source forge, etc). Github provides bug tracking, default licenses, blog and great mechanisms for accepting changes from the community. Built on git, it facilitates distributed projects quite well.
Although it's good to have a one-step build and install in place, automating integration of others changes probably isn't important (or desirable) off the bat.
Good luck!

How do you database access (I/O) to/from Magento Commerce?

So, I want to import, export and modify the database. I have read that I have to do that by XML, but I don't really understand their doc system and I haven't found any good tutorials out there that explain this. I am slowly reading the very expensive and short book which is somewhat answering my questions, but I crave more.
As a second question, I want to have a order system where I can send out information or emails with my own code. I assume this would be some type of plug-in that would override or be called at a certain time. Any info would be helpful.
Some parts of the magento data can be imported/exported via the backend (System->Import/Export), namely products and customers.
If you want to deal with the complete DB - use your DB tool of choice (I prefer mysqldump).
When dealing with exported CSV.. use OpenOffice, from my experience it deals better with the separation characters than Excel.
As for your second question - as far as I understood, you will have to develop a module if you want to do something different than the existing functionality and keep the original mail functions. If you don't want to/have to keep the original functions, you can opt to overwrite the module, which is much easier as far as I can see. Google search for "overriding magento module" should turn up atleast one decent tutorial.
I found what I was looking for here:
(on magento site: Resources -> Magento Core API -> Product API or whichever API you want)
The problem is there is no Order API yet (or none that I've seen)
http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product#examples
This details how you'd write an external php script and obtain,edit or delete products (or anything else with an API).
Modules still look daunting, but I am reading through the (very thin) magento book (the only one available).
I hope this helps someone else.

A beginner's question on web technologies [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am just dipping my hands into web technologies. I started with HTML and now JavaScript and PHP. I have a variety of questions in my mind. I am a hardcore .NET Windows developer and earn my living with it. But now I want to go deep into Web and so here are my queries:
(1) I started using PHP. I also want to learn Ruby with Rails. Can I learn both side-by-side?
(2) What type of sample projects I can develop to learn well these technologies? I just have in mind to make a web log, that it.
(3) I am using Aptana Studio 2009. It is very good but not the best IDE. Which other IDE can speed up my design time? Any tool that separates the design with business logic automatically?
(4) What other things I must learn to bring myself to the front in web technologies?
Firstly, I applaud the initiative in learning Web technologies. Frankly, going forward, I think programmers will increasingly find it harder to not know Web stuff.
To answer your questions:
I would advise sticking to one at least for awhile. I'd suggest that one be PHP. Why? Ruby on Rails is a language and a framework. I'm a strong advocate of people having some understanding of the underlying technologies, including HTTP, before they throw frameworks on top of it that may confuse or hide issues a developer needs to know about. Stick with vanilla PHP and don't confuse it by throwing something like CodeIgniter, Kohana, Symfony, CakePHP or Zend on top of it;
A blog is a fine learner project. Whatever you pick shouldn't be something terribly complicated, something you can get something out of relatively quickly and something you should be able to add features you want to (you'll be more interested this way);
Jetbrains new Web IDE is coming along nicely. It's what I've switched to. PhpEd, Eclipse PDT and Netbeans all have different merits;
HTMl, CSS and Javascript. Additionally I'd also recommend jQuery.
1) Yes. But it is advisable to pick one technology/web framework and master it. It is easy to get caught in the technology rat race.
2) Think of a problem you have been facing say at workplace. Perhaps there is some routine work that can be done better using a web application. Use that as a project.
4) Read up on basic design principles like layout, color etc. The Non-Designer's design book is a good place to start.
1). I personally would advise you go with Ruby, Java or .NET but stick to one whilst learning, preferably the one closest to he language you know already, which for you means .NET (C#?). I wouldn't recommend PHP under any circumstances but plenty would.
2). Yes, a blog is a good starter project.
3). Just get yourself a good text editor for starters. IDEs make a hash of HTML/CSS/JS which is what you'll be doing a lot of too. But you can stay on the free side by getting a copy of Visual Web Developer Express Edition.
4). Get seriously aware of HTTP, HTML, CSS + JS. In fact don't even think about dynamic pages until you have static pages down solid. Then add dynamic functionality.
Addendum:
From my experience of colleagues who have taken the path you're taking, desktop development teaches you a number of bad habits for web development that you're going to need to unlearn. Specifically: assumptions about state, client vs server, concurrency, and - both most and least serious - inline styling. Bad. Bad. Bad.
A solid understanding of HTTP helps clear some of those, and learning CSS (as an effective way of learning the value of separation of concerns) helps with the latter. Concurrency is something most frameworks will take you 90% of the way with but it's always going to be up to you to think about when and how to apply it.
Given further thought I would ultimately recommend you stay in .NET land (the ASP.NET pipeline model and C# as a whole are solid and mind-blowing respectively) and get yourself express and download ASP.NET MVC extensions for it - the WebForms model is pretty widely reviled by web developers for a reason, but coming from a desktop background it might be more immediate for you. At the expense of settling you into those bad habits I mentioned.
Yes if you're dedicated. If your php is stronger than your RoR familiarity there's a book for you # http://railsforphp.com/ - I would recommend getting more familiar with PHP then jumping to RoR as it's a bit more to learn because of the whole MVC architecture and the language itself is different from most semicolon and braces C-style languages.
The hello world of web programming - a blog.
Personally I use VIM which isn't an IDE, but it's pretty friggin efficient for text editing.
I would recommend often reading Stackoverflow and try to answer some questions while you're learning some new technology, it'll double the rate at which you'll learn if you really force yourself.
You can. I think I would advise
against it.
Blogs are good
places to start. Maybe a photo
gallery?
Eclipse is nice for all
sorts of development.
Like Nike
says, "Just do it" :)
1) This depends on your learning capability, but you really shouldn't. Start with either one, get good at it, then the second one will be much easier to learn.
2) As said before, blogs are a great way to start. You also want to create something like a shopping system to get the grip on good database development.
3) You don't want to create Business Logic alongside the UI. Try learning about templating engines such as Smarty, and your problem will likely vanish instantly. Try Eclipse for an IDE, or better, learn about vim.
4) Discipline. It is incredibly easy to shoot yourself in the foot using PHP and Ruby using crappy code. Dot your is and remember to initialize your variables. Don't just copy code from somewhere, but think of what it does and what could go wrong. Sanitize user input. This takes work, but saves headaches later on.
1) Dont you will just confuse yourself. Learn one after the other both are good!
2) Amazon and Wikipedia are largly php based, I know of a couple of airline booking systems, most blogs are based on one of several freely available php applications.
3) For php/javascript/css I have always gotten by quite happily with good old vim, but thats just me. I would beware of any "framemaker" type GUI html editors as they tend to generate a lot of confusing and unreadable html. Its alright for a static page but when you generate a dynamic page you really need to know what all the html tags are there for.
4) If your serious you really need to learn about cascading style sheets and how to use them properly.
(1) It is all about what you want to do and are you OK with handling new technologies. You can do anything.
(2) What about hello world or simple login application if you are beginner really.
(3) Eclipse always a Best option to think.
(4) CSS, JavaScript, and new JavaScript frame work like prototype,jQuery and more importantly some of the tag library.