Questions tagged [data-objects]

93 questions
13
votes
5 answers

Refactoring large data object

What are some common strategies for refactoring large "state-only" objects? I am working on a specific soft-real-time decision support system which does online modeling/simulation of the national airspace. This piece of software consumes a number…
andersoj
  • 20,778
  • 6
  • 59
  • 72
7
votes
1 answer

Create a DataObject to build table rows and columns in SilverStripe

I'm trying to do something very different for a SilverStripe site: on several subpages are tables of data, and these tables each have their own set of column headers, and some tables have more columns than others. I want to avoid building out tables…
Dejsa Cocan
  • 1,418
  • 2
  • 16
  • 45
7
votes
3 answers

How to define difference between business model and a data model?

I see the term often used as if there is a concrete distinction between the two when discussing MVC for OO languages. From what I get from context it is that business models perform an action to mutate the data models. Is that a correct way to…
startoftext
  • 3,632
  • 4
  • 36
  • 48
6
votes
1 answer

Silverstripe 3.2: How to add and update Dataobjects in a frontend form dynamically?

Example: I have Members (who can login and update their data) who have one or many qualifications. So I have a DataObject 'Members' and a DataObject 'Qualification' with a has_one/has_many relationship. Something like this: class Qualification…
iraira
  • 315
  • 2
  • 13
4
votes
3 answers

Java Design: dealing with data objects used by many classes

First, a brief description of the library that brought this up: I have a library that listens continuously on a provided serial port, reading in blocks of bytes and passing them along to be processed in some meaningful way (details aren't important…
JDS
  • 1,173
  • 3
  • 13
  • 26
3
votes
1 answer

DataObject.GetDatapresent with subclass

When I call this method DataObject.GetData(typeof(ItemType)) from an instance of a subclass of ItemType the method returns null... How can i get the data from the subtype? Thank you
Giacomo Tagliabue
  • 1,311
  • 2
  • 11
  • 28
3
votes
2 answers

Silverstripe 3.2 - How to manage different lists of the same Dataobjects in ModelAdmin in different tabs

I'd like to manage different filtered lists of the same DataObject in ModelAdmin. I have the DataObject "Message" which has a SentbyID and a SenttoID. In ModelAdmin I want to manage two lists. One list with all messages with a certain SentbyID and…
iraira
  • 315
  • 2
  • 13
3
votes
1 answer

Data Model Definition Standard in JavaScript/Node

I recently started programming in JavaScript (Server side) and Node.js. I come from Java background where there is a concrete standard on how you define Data Object, which is Java Bean. Do we have any such standards in JavaScript/Node on how we…
Prabhash Rathore
  • 619
  • 8
  • 17
2
votes
1 answer

How to build data object in browser?

I want to know that can we build a data object using jquery/json, which only exist in the browser like we have session object at server side? The reason for having a data object is that I am providing different layouts for users so they can…
Safran Ali
  • 4,359
  • 9
  • 37
  • 57
2
votes
2 answers

PHP PEAR/DataObject equivalent to Rails' easy ActiveRecord finding functionality

In Rails, say a blogging application, given a particular post object you could get the name of the author of the post doing something like: post = Post.find(1) author_name = post.author.name Is there a PHP equivalent using DataObject, something…
jefflunt
  • 32,075
  • 7
  • 80
  • 122
2
votes
1 answer

How to yield a nilable shared object in Chapel?

Currently, I am working on Chapel Data Objects and I am facing some issues. I have a class named Row which can be nil. I have these three methods: override iter these()ref { for row in this.fetchall(){ yield row; } } …
2
votes
1 answer

Silverstripe 3.2: How to export db fields of only one Dataobject in a CSV file?

I know there is a GridFieldExportButton which exports all the data of a GridField. But what I want is a custom Button which exports all the $db fields (ore just a few of them) of only ONE DataObject in a CSV file and download it. So I want this…
iraira
  • 315
  • 2
  • 13
2
votes
1 answer

SilverStripe 3: How to display the URL Segment / Page info of a DataObject

I'm getting all my DataObjects from a specific class and displaying them randomly on another page. I need to access the URL segment of the page they belong to. How do I do this? I've tried, $URLSegment $UP.URLSegment $Parent.URLSegment etc which I…
pinkp
  • 735
  • 2
  • 8
  • 29
2
votes
1 answer

DataObject + TranslatableDataObject + ModelAdmin

Setup: SS 3.1.13, Translatable 2.0.8 and TranslatableDataObject dev-master. I have two DataObject classes: "Facility" ($has_one) and "FacilityType" ($has_many) which I chose to be managed in ModelAdmin (as they are global properties of the site…
user776686
  • 5,924
  • 9
  • 52
  • 94
2
votes
0 answers

nextRowset() do-while loop causing 500 error

I'm creating a web service for a mobile application in PHP using PDO database calls. The problem code is below: // Prepare Stored Procedure Call $query = "CALL " . $_GET['proc'] . '('.implode(', ', array_keys($paramArray)).')'; $stmt =…
wUmpage
  • 153
  • 1
  • 12
1
2 3 4 5 6 7