I'm creating a multi-step process (4 steps to be exact) that is initiated from a link on the home page. For example I am clicking a link that says "Create a Job Post" and that takes me to step 1 of creating that post. The way I'm handling it with FlowRouter is creating 4 separate routes like this "/job/create/step-1", "job/create/step2", etc.
Then I create 4 templates one for each step of the process and then I linked them together using "Back" and "Continue" buttons to move forward or backwards in the steps process in case the user needs to edit and all that good stuff.
The way i'm approaching it works, and i'm not aware of any pitfalls of doing it this way if any; but it does seem like there's a cleaner more logical way to do this.
I was wondering if anyone had any patterns to offer, or advice on how something like this could be handled in meteor. I suppose you could compare it to how some blogs have a "Next" and "Previous" button to grab the previous post record and to grab the next post record without knowing what those posts are. I like the dynamic way of doing this, but I also should reason with myself that in this particular use case I only have 4 steps and all the pages are known and won't change.
I hope this makes sense. Thanks to anyone that takes the time. I'm looking more for ideas and existing patterns than anything else, but if you have some code to share in making your point that's cool too.
Related
I'm trying to understand how URL Mapping works. I've gone through numerous pages, but I can't seem to wrap my head around what I'm trying to do.
Its really simple, I use DataObjects as pages approach and I have a member extension written to the member class. And I have the typical actions, show, edit, add.
So if I go to www.mywebsite.com/members/show/1 I can see the first user. If I change show to edit, I can edit the first user. Now if I go to www.mywebsite.com/members/add I can create a new user. This is working all as expected due to the functionality I created in the add method.
My problem is in the fact that when you go any website, you don't register to the website by going to members/add, you register by going to website.com/Register or something similar. From code management perspective, it is a lot easier for me to leave the code the way it is now. I don't want to have to create a Register page and move the code there, instead I am trying to figure out if it is possible to go to www.mywebsite.com/Register and have it load www.mywebsite.com/members/add. I am not talking about a redirect link that would update the url, I want users to still see Register in the url and not see /members/add.
Vice versa, if users were to go to www.mywebsite.com/members/add I want the link to update to Register or say page not found.
Is this possible with Silverstripe Framework?
I am not 100% sure, but I believe this is called URL Masking.
This is very possible, firstly I'd advise that you look over...
silverstripe-memberprofiles
...because even if you dont' want to use an existing module I'm sure there would be useful information. There is a great example of "pure" routing (i.e. silverstripe no cms) that leads on to "nested" routes - which is what I think you are asking for, so I highly recommend reading the slides below and then the created todo app
silverstripe-framework-building-without-the-cms
todo app source
Our website is powered by Drupal 7 and we are looking for a way to implement a "I am Interested" button/link on a particular node for registered users. The problem here is that we'd also like to be able to display all the usernames who have clicked this button/link.
The idea here is to provide our viewers with a simple way to be able to indicate interest in a particular topic, and essentially giving them an outlet to communicate to other users who have shown the same interest.
I've tried a number of different modules that other sources have suggested: "Flags, Dlike, LikeBtn, Rate Widget, etc." and unfortunately they don't seem to ultimately do what I'm looking for. I want to believe that there is some combination of modules that can perform these actions, so I would greatly appreciate any guidance that can be provided.
I do apologize for my ignorance in this type of development. Looking forward to growing into this community.
Cheers.
You can achieve that with the Flag module (which you tried), and the Views module to display a list of users that have clicked the flag for a particular node.
Looks like this answer would help you out with the Views config to list users that have flagged a node (or poked a user in the example).
Ok, so maybe my search syntax is wrong here, this could have very well been covered in stackoverflow but i've been unable to find anything after hours of searching. Be warned, I am a novice developer when it comes to this type of stuff and would appreciate any guidance, help or pointers to accomplish the goal. I'm open to suggestions of any type! :)
So, I have a site http://www.animetip.com
On this site we have a popular feature called a "jump menu" which allows a user to quickly navigate directly to the page which contains the anime series they would like to see an episode in. Essentially we have every series on the site (over 1000) broken down in an a-z list. When a user hovers over a letter, the menu will drop down and display all series that begin with that letter. A user can then go to the series they'd like to view and click on it to go directly to the page.
The issue with this is SEO. We are being penalized due to the number of links on the page. What we need to accomplish is the same (or better) functionality while reducing the links loaded in the page. If we could come up with a way to create the menu and have the link itself not be served until its clicked on I believe that would resolve the issue.
What is the best strategy for doing this? I am no expert by any means, but I was thinking that putting all the links in mySQL and then calling the link as its clicked would be ok, but a friend cautioned me that it would cause a performance hit. I have also reviewed material which indicates you can do the same thing using an array to store the links and then call them as they are needed using PHP. I grasp the concept of doing that but could use a stub type example to get me started.
The site is built on Wordpress with a completely custom template / theme.
Someone has commented that the topic wasn't researched. Unfortunately I've spent lots of time researching it, the problem is that I think I'm using the wrong terminology to describe what I need to find. If anyone would care to give me the terminology or a good place to conduct further research (even a few keywords!) I will be MORE than happy to go do that.
Thank you for any help or tips to information I can learn from!
Brett
Try using ajax so that the links are not visible in the actual source code and while clicking the a,b,c links it will call a separate php file and display the output from the db on the fly. I hope this will resolve your issue. Thanks
ASP.NET, web form model.
Is there any sample code/site that demonstrate a couple samples for regular website patterns/ templates? Like if I want to use tab to switch between different pages, should I put the code in a single page or in different page, and treat each tab as a page.
Or if in a search page (just a single search bar and button), should I display my result panel in same page using dynamically enable the result panel, or just to another page?
I want to find a general design pattern/ template. Please advise, thanks.
I don't know if this answer will be helpful to you or not. Correct me if I am wrong.
You are specifying demonstration about web designing. It seems the functionality you want is clearly saying to choose from weather you want to use AJAX or not. I suggest why don't you use jQuery Framework for all this functionality.
I would give this a read and consider what best fits your application and your programming style, no one size fits all with paterns.
http://msdn.microsoft.com/en-us/magazine/dd252940.aspx
After you have a general idea, head over to google.com and look for the patterns that catch your eye for simple tutorials
Edit:
For the specific question about whether you should modularize your code. The answer is almost always yes. If you think there is a chance that the component will be used somewhere else then doing this a head of time can save you a lot of headache later. This practice also makes maintaining a lot easier because it gives a clear scope of what could be causing a bug. Instead of having to look threw an entire page of unrelated code for things changing state unexpectedly in the page life cycle.
Stackoverflow members,
How do you currently find the balance between javascript and code behind. I have recently come across some extremely bad (in my eyes) legacy code that lends itself to chaos (someHugeJavafile.js) which contains a lot of the logic used in many of the pages.
Let's say for example that you have a Form that you need to complete.
1. Personal Details
2. Address Information
3. Little bit more about yourself
You don't want to overload the person with all the fields at once, so you decide to split it up into steps.
Do you create separate pages for Personal Details, Address Information and a Little bit more about yourself.
Do you create controls for each and hide and show them on a postback or using some update panel?
Do you use jQuery and do some checking to ensure that the person has completed the required fields for the step and show the new "section" by using .show()?
How do you usually find the balance?
First of all, let's step back on this for a moment:
Is there a CMS behind the site that should be considered when creating this form? Many sites will use some system for managing content and this shouldn't be forgotten or ignored at first glance to my mind.
Is there a reason for having 3 separate parts to the form? I may set up a Wizard control to go through each step but this is presuming that the same outline would work and that the trade-offs in using this are OK. If not, controls would be the next logical size as I don't think a complete page is worth adopting here.
While Javscript validation is a good idea, there may be some browsers with JavaScript disabled that should be considered here. Should this be supported? Warned about the form needing Javascript to be supported?
Balance is in the eye of the beholder, and every project is different.
Consider outlining general themes for your project. For example: "We're going to do all form validation client-side." or "We're going to have a 0 refresh policy, meaning all forms will submit via AJAX." etc.
Having themes helps answers questions like the one you posted and keeps future developers looking in the right places for the right code.
When in doubt, try to see your code through the eyes of someone who has never seen it before (or as is often the case, yourself 2 to 3 years down the road), and ask yourself: "Based on the rest of the code, where would i look for this function?"
Personally, I like option number 3, but that's just because it fits best with the project I'm currently working on and I have no need to postback or create additional pages.