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 8 years ago.
Improve this question
For me, the toughest part of making app was finding ways to make tastypie work in undocumented area.
I'm listing stuff I find it hard about tastypie below.. (It's been a few month I actively worked with tastypie-related code. so my description might not be perfect)
It's mostly about related-field management.
Suppose resource_a has related field resource_b.
When user create a resource_a_instance with resource_b_data,
if resource_b_data is dictionary data, tastypie creates resource_b_instance and creates resource_a_instance. (I find this is magical.. We can only control 'related_name' to something.)
if resource_b_data is resource_uri, tastypie uses it as foreign key.
So either, client has to send resource_uri only for resource_b, or server has to modify the resource_b_data.
when client sends 'patch', tastypie actually get all the fields to construct the corresponding object, and do 'put'. and it has to read related fields as well iirc.
I encountered a bug dealing with image field update.
https://github.com/toastdriven/django-tastypie/issues/1018
tastypie dehydrates and uses it to update the object, dehydrating image-field gives url not the path and it causes the problem.
dehydrate is for preparing data for user consumption, and it's used for updating data... I guess it's a big problem.
I'd like to send subset of defined fields per requests, but it doesn't seem to be there's a cleaner way.
How do I paginate the many-end of a related field? (with the pagination related meta field included)
#3, #4 are just examples, when I have to do something beyond the doc, it's hard to know how to proceed. I guess you have to read the code carefully..
I hope if someone could show how the above problems are solved in django-rest-framework world as well.
I've seen comments about django-rest-framework having well-thought-out structure and wonder if it indeed offer easier solution on above problems.
Related
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
Many a time do I find myself pointed out to use some code in some github repository, and I find it hard to asses whether I should trust and use the code.
Assuming The code is an answer to my visible needs, what other parameters should I check in order to decide if using the code is a good idea?
You should check:
documentation - Is everything clearly documented? Would you need support from the author to use the code?
activity - Sometimes authors could not constantly push updates to the library, but it is important issues and pull requests are resolved rather quickly. Common bugs often are resolved by others in a pull request, but if it's not merged it's rather hard to handle all the forks.
Also you should check the Pulse page in the repo. It will show the activity in issues, commits and releases.
extensibility - You may want to do something different with the library. Or you may want to build something on top of it. You should check the API (the public interface), the configuration and whether some components could be changed with something else (think interfaces and the composite design pattern).
tests - Unit tests are important. You should write tests for your own application. When you use an external library, make sure it is well tested so you use a component which will work the same when you update it or use it in a different environment. If the code is not tested you should not use it. Unless you wrote the tests yourself.
You can check out the chrome extension DevGib that I wrote. It automatically rates Stackoverflow questions and Github repositories before accessing them, by showing a small colored icon next to the link. It's still work in progress but it does the job for me.
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 3 years ago.
Improve this question
I am on a dedicated project. It is an e-commerce website. That website is in 3 languages and runs on 7 domains at the moment ( .com/.us/.au/.fr/.ru/.ca/.nz ). It has been running since forever so very old logics and processes are still being applied into it as big changes cannot be made easily. Now, it has 32 email templates for every domain related to purchase etc. At the moment if there is even a little change a designer has to do it 32x7 times. It is highly redundant. I proposed my development team to make master template for each domain and seeing as only EN FR and RU will need different templates so i will have to only make changes 3 times. Now, i am baffled as to how the backend for that would/should be, as in, the header, footer, navigation etc will all be coming from cms/database where a non technical person will enter text to make changes. Can you please give me an idea as to how should i approach this ? The project is in asp.net.
Sorry for the long description but i am really confused as to how the data entry person will enter all the information related to emails and other things that will need this sort of implementation. Sorry for my english as i am not sure myself if i was able to clearly state the issue, let me know and i will explain it again. Thanks.
If you use a proper CMS (e.g. Kentico CMS) that stores content in a database, the backend depends on how the CMS organizes the data in its database.
Learn about how the content maintainers will organize the language-dependent content (in the way that you are already thinking about it - content for what defined page sections per language)...and how that will translate into your CMS's underlying organization of the data.
Start small, and be systematic - on the input end (i.e. how a content maintainer will go about doing their part) and on the content-consumption end; try to make one simple portion of the site that works with so much redundancy today...work without it; and go from there.
For example, focus initially on one simple defined section in one page with content for each language. With that clear, consider a more complicated section that requires organization of content for each of its content areas. Then expand to multiple pages, considering different page types that may have different defined sections (and may already be clear from different master pages they employ).
For email templates in particular, I have successfully used a CMS-maintained Smarty template per transactional-email type (e.g. order confirmation, shipment confirmation etcetera) for e-sales - even with ASP.NET being the primary technology on the team. You may need # of email types * # of languages templates, but it sounds like such an approach could work.
Also, consider that your CMS very well may expose services whereby you can get the content, such that you do not really have to be directly concerned with how it organizes the backend data.
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
If you just start typing a person name in the Facebook search box(displayed in blue upper bar on your profile) then suddenly within a fraction of a second search results appear and they comes much more faster if that person already exist in your profile.
so i just want to know that what is behind this search.i mean to say that which software tool and algorithm they are using for it.
i know that no one other than Facebook can explain exactly about it thats why i am just asking to give me an idea about that.
i am sure that they are using something which is open source.
The response is an autocomplete Ajax form, but this is not really the question. The key question here is how fast can you search in a text field. Facebook splits this into 2 parts. First they search in the list of your friend which is a cached and relatively rarely changed file containing 100 to a 1000 entries. This is quite fast. The other thing is to search for a name in ALL Facebook, which means I guess 1 billion names. This is a little more tricky, but I guess they have them splitted and indexed by letters or letters combinations. For example:
// search query Alice Cooper
A ... they give you a list of A like names Alina, Ana, Alice...
Al .... they limit it to Alicia, Alice, Alina ...
// and so on
Probably after a 3 letters they are starting to do a search, but not in the 1 billion rows, but in a limited subset of your 3rd level friends and probably increasing it each time.
Probably your query is never compared with the whole table, and there are definitely cached levels or recalculated queries for most of the common names.
This is in terms of technique. In terms of technology take a look at Solandra, a search engine build on top of Cassandra which Facebook is using, though I cannot confirm that this is what they are using, but just to give you a research direction.
I assume the underlying technology is AJAX, with some caching mechanism that increases performance for profiles in your friends list.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Can somebody suggest a place (websites) where to find 'real' FIX messages.
By real I mean not examples but 'real' so that if I put them into an engine it won't complain that tag 10 is incorrect or that I am missing some mandatory tags.
I am specifically after execution reports.
Ideally I'd love to find a large sequence of fix messages representing few days of activities.
I appreciate this can be sensitive data but surely tag 1,tag 207,tag 55 can all be obfuscated.
Many Thanks
Try FIX parser and click on the "sample data" button. It will generate a set of valid fix messages (including execution reports). Obviously you can also use it as a FIX parser to help you make sense of your data. Note that this text is separated by the actual FIX delimiter (SOH character). This means that visually all the text will look like a jumble of characters.
The problem with FIX is it'a a real catch-all protocol. It allows a lot of flexibility.
If you look, for example, at the spec for the Execution Report message in FIX 4.4 (BTW: always better to specify a version number with FIX), you'll notice that most of the tags you mentioned are not required by the protocol. Of the three you mentioned, only tag 55 is required on that message type. That means that whether tag 1 or 207 are there or not is up to the implementation in question.
So, unfortunately, there are no canonical samples. You should ask for sample messages from the party with whom you're trying to communicate.
You can get some sample data from validfix.
fix-analyzer.html has many examples of different fix messages
fix-log-analyzer.html has just one big example of a real log from some sort of fix engine.
(fixed broken link)
There are some examples of the TradeCaptureReport message you're talking about on my Online FIX Decoder page (shameless plug) which will not only show you the contents of the encoded message, but will decode it neatly into a table for you, assigning labels to the otherwise cryptic integers.
These particular examples were made publicly available by the LSE.
If you're doing trade reporting, the exact format you have to send will depend upon the vendor you're using. It's best to contact them directly and ask for samples as what is valid for one vendor is likely different from another.
There are some on the FIX protocol website if you have access (I don't know if they are available without logging on) or you can generate them yourself using the examples provided by quickfix.
Go to the CME-DataMine website where you can find Market Depth FIX files with all market data messages required to recreate the order book. ( CME DataMine )
I had the same need and ended up having to build something to automatically reformat FIX messages from one session to another. It turned out to be quite useful in our own testing, so I ended up hosting a server for it. Shameless plug here, but FIXSIM.com might be of use.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am looking to revamp our CRUD web forms and would appreciate any examples of good UI design.
We have lots of database tables that have minimal editing needs by the user - Country Codes, Tax codes, Product prices, and so on - and these all currently use a simple format for CRUD, but it was designed by developers and looks very bland, and quite possibly could have far better usability, and certainly a better design.
Our process is:
Find screen - which also has an ADD NEW button. Enter values for any parameters relevant to search for and press FIND button. Matching records displayed in a grid with an EDIT link. The corresponding Edit form allows CLONE, DELETE and SAVE.
Where appropriate an Edit form may display Child Records.
For very complex records / relationships the Edit form is replaced by a Record Card, which displays everything including the kitchen sink! and appropriate records / sub records have EDIT links.
Its functional, but uninspiring.
On an 80:20 basis the code is all mechanically generated, so re-generating it for a new metaphor shouldn't be too hard.
I like a lot of the UI in the Magento eCommerce Admin pages, but I would be interested in any other examples you can recommend
Here are some examples of UI patterns:
Input Controls
Stacked Tabs
Inline Input Adder
One Page Wizards
Overlay
Generally each section will explain the pattern, how and why to use, and gives a handful of graphics as real world examples.
As an additional resource, you can also visit ThemeForest's admin template site and browse through their many products and get pictures and live tours of very well designed and styled admin pages. I personally have used a few of these templates for data heavy sites.
Hope these help you out some.
7/25/18 Update: While it is hard to keep links from nine years ago working, it seem that the website which hosted the UI examples is now gone. Read Farewell from Patternry for further information.
Links worth a look:
http://www.smashingmagazine.com/2008/04/17/web-form-design-modern-solutions-and-creative-ideas/
http://somerandomdude.com/articles/design/form-design/
The Dynamic Data Web Site that you can create using .Net 3.5 is pretty handy. Good clean dynamic CRUD ability and yet very customizable. Routing makes it possible to default to generated pages when needed and custom pages if you choose to create them.
Dynamic Data Web Site
These guys have really nice examples-
http://wufoo.com/gallery/
To me, the Django admin interface is a good example of a CRUD interface.
I've just stumbled onto this one
there you will find a couple of REALLY GREAT templates!!!
http://www.webappers.com/2009/09/18/20-professional-web-admin-templates-on-themeforest/